timeout

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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