memcache

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr        string
	IdleConns   int
	Timeout     xtime.Duration
	CacheExpire xtime.Duration
}

Config memcache config.

type InvalidUnmarshalError

type InvalidUnmarshalError struct {
	Type reflect.Type
}

An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. (The argument to Unmarshal must be a non-nil pointer.)

func (*InvalidUnmarshalError) Error

func (e *InvalidUnmarshalError) Error() string

type Memcache

type Memcache interface {
	Get(key string, obj interface{}) (err error)
	Set(key string, v interface{}) (err error)
	Add(key string, v interface{}) (err error)
	Replace(key string, v interface{}) (err error)
	GetMulti(keys []string) (items map[string]*mc.Item, err error)
	Touch(key string, seconds int32) (err error)
	Increment(key string, delta uint64) (newValue uint64, err error)
	Decrement(key string, delta uint64) (newValue uint64, err error)
	DeleteAll() (err error)
	Delete(key string) (err error)
	FlushAll() (err error)
	CompareAndSwap(item *mc.Item) (err error)
}

func New

func New(cfg *Config) Memcache

type UnmarshalTypeError

type UnmarshalTypeError struct {
	Value  string       // description of JSON value - "bool", "array", "number -5"
	Type   reflect.Type // type of Go value it could not be assigned to
	Offset int64        // error occurred after reading Offset bytes
	Struct string       // name of the struct type containing the field
	Field  string       // the full path from root node to the field
}

An UnmarshalTypeError describes a JSON value that was not appropriate for a value of a specific Go type.

func (*UnmarshalTypeError) Error

func (e *UnmarshalTypeError) Error() string

Jump to

Keyboard shortcuts

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