Documentation ¶
Index ¶
Constants ¶
View Source
const ( MinUint32 uint32 = 0 MinUint64 uint64 = 0 )
Variables ¶
Functions ¶
Types ¶
type Cache ¶
type Cache interface { // Get gets a cached value by key. Get(ctx context.Context, key string) (any, error) // Fetch is batch version of get Fetch(ctx context.Context, key []string) ([]any, error) // Put stores a key-value pair into cache. Put(ctx context.Context, key string, value any, timeout ...time.Duration) error // Delete removes a key from cache. Delete(ctx context.Context, key string) error IsExist(ctx context.Context, key string) (bool, error) ClearAll(ctx context.Context) error Incr(ctx context.Context, key string) error // Decrement a cached int value by key, as a counter. Decr(ctx context.Context, key string) error }
type Unmarshaler ¶
Click to show internal directories.
Click to hide internal directories.