value

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetConfiger

func SetConfiger(ctx context.Context, configerType constants.ConfigerType) error

func WatchUpdate

func WatchUpdate(ctx context.Context)

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(namespace, prefix string, expire time.Duration, load LoadFunc) *Cache

func (*Cache) Del

func (m *Cache) Del(ctx context.Context, key interface{}) error

func (*Cache) Get

func (m *Cache) Get(ctx context.Context, key, value interface{}) error

func (*Cache) Load

func (m *Cache) Load(ctx context.Context, key interface{}) error

type LoadFunc

type LoadFunc func(ctx context.Context, key interface{}) (value interface{}, err error)

key类型只支持int(包含有无符号,8,16,32,64位)和string

Jump to

Keyboard shortcuts

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