Documentation ¶
Overview ¶
重复插入key相同的value, 不更新该key的deadline
Index ¶
- type TimeoutStore
- func (s *TimeoutStore) Get(ctx context.Context, key string) (storetypes.KeyValue, error)
- func (s *TimeoutStore) PrefixGet(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)
- func (s *TimeoutStore) PrefixGetKey(ctx context.Context, prefix string) ([]storetypes.Key, error)
- func (s *TimeoutStore) PrefixRemove(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)
- func (s *TimeoutStore) Put(ctx context.Context, key, value string) error
- func (s *TimeoutStore) PutWithOption(ctx context.Context, key, value string, opts []interface{}) (interface{}, error)
- func (s *TimeoutStore) Remove(ctx context.Context, key string) (*storetypes.KeyValue, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeoutStore ¶
func New ¶
func New(timeout int, backend storetypes.Store) (*TimeoutStore, error)
func (*TimeoutStore) Get ¶
func (s *TimeoutStore) Get(ctx context.Context, key string) (storetypes.KeyValue, error)
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) 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)
Click to show internal directories.
Click to hide internal directories.