memcache

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const Chunksize = 950000 // A single memcache item can't be bigger than 1000000 bytes

Variables

This section is empty.

Functions

This section is empty.

Types

type SingletonProvider

type SingletonProvider struct {
	*mclib.Client
	ErrIfNotFound bool // By default, we swallow 'item not found' errors.
	ShardCount    int  // defaults to no sharding. Set this if you need to store >Chunksize
}

func NewProvider

func NewProvider(servers ...string) SingletonProvider

func (SingletonProvider) ReadSingleton

func (sp SingletonProvider) ReadSingleton(ctx context.Context, name string, f singleton.NewReaderFunc, obj interface{}) error

func (SingletonProvider) SetDialer

func (sp SingletonProvider) SetDialer(dialer func(network, addr string, timeout time.Duration) (net.Conn, error))

func (SingletonProvider) WriteSingleton

func (sp SingletonProvider) WriteSingleton(ctx context.Context, name string, f singleton.NewWriteCloserFunc, obj interface{}) error

Jump to

Keyboard shortcuts

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