Documentation ¶
Overview ¶
Package mc memcache 客户端组件
Index ¶
- Variables
- func GatherMetrics()
- func IsCacheMiss(err error) bool
- func IsNotStored(err error) bool
- func Reset()
- type Item
- type MC
- func (mc *MC) Add(ctx context.Context, item *Item) error
- func (mc *MC) CompareAndSwap(ctx context.Context, item *Item) error
- func (mc *MC) Decrement(ctx context.Context, key string, delta uint64) (uint64, error)
- func (mc *MC) Delete(ctx context.Context, key string) error
- func (mc *MC) Get(ctx context.Context, key string) (*Item, error)
- func (mc *MC) GetMulti(ctx context.Context, keys []string) (map[string]*Item, error)
- func (mc *MC) Increment(ctx context.Context, key string, delta uint64) (uint64, error)
- func (mc *MC) Replace(ctx context.Context, item *Item) error
- func (mc *MC) Set(ctx context.Context, item *Item) error
- func (mc *MC) Touch(ctx context.Context, key string, seconds int32) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCacheMiss 未命中缓存 ErrCacheMiss = memcache.ErrCacheMiss // ErrNotStored value未存下, 没有满足条件(i.e. Add or CompareAndSwap) ErrNotStored = memcache.ErrNotStored )
Functions ¶
Types ¶
type MC ¶
type MC struct {
// contains filtered or unexported fields
}
MC memcache 客户端实例
func (*MC) CompareAndSwap ¶
CompareAndSwap cas
Click to show internal directories.
Click to hide internal directories.