timeout

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

重复插入key相同的value, 不更新该key的deadline

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeoutStore

type TimeoutStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(timeout int, backend storetypes.Store) (*TimeoutStore, error)

func (*TimeoutStore) Get

func (*TimeoutStore) PrefixGet

func (s *TimeoutStore) PrefixGet(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)

func (*TimeoutStore) PrefixGetKey

func (s *TimeoutStore) PrefixGetKey(ctx context.Context, prefix string) ([]storetypes.Key, error)

func (*TimeoutStore) PrefixRemove

func (s *TimeoutStore) PrefixRemove(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)

func (*TimeoutStore) Put

func (s *TimeoutStore) Put(ctx context.Context, key, value string) error

func (*TimeoutStore) PutWithOption

func (s *TimeoutStore) PutWithOption(ctx context.Context, key, value string, opts []interface{}) (interface{}, error)

func (*TimeoutStore) Remove

func (s *TimeoutStore) Remove(ctx context.Context, key string) (*storetypes.KeyValue, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL