memcached

package
v2.27.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ClusterRouter - a router to signal a full cluster route
	ClusterRouter []byte = []byte{0, 0}
)

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// Nodes - the memcached nodes
	Nodes []string

	// NumConnectionsPerNode - idle connection per node
	NumConnectionsPerNode int

	// ReconnectionTimeout - the time duration between connection retries
	ReconnectionTimeout string

	// MaxWriteTimeout - the max time duration to wait a write operation
	MaxWriteTimeout string

	// MaxReadTimeout - the max time duration to wait a read operation
	MaxReadTimeout string

	// MaxWriteRetries - the maximum number of write retries
	MaxWriteRetries int

	// ReadBufferSize - the size of the read buffer in bytes
	ReadBufferSize int
}

Configuration - configuration wrapper

type Memcached

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

Memcached - main struct

func New

func New(stats *snitch.Stats, configuration *Configuration) (*Memcached, error)

New - initializes

func (*Memcached) Delete

func (mc *Memcached) Delete(router, namespace []byte, fqnKeys ...string) error

Delete - deletes an object from the cache

func (*Memcached) Get

func (mc *Memcached) Get(router, namespace []byte, fqnKeys ...string) ([]byte, bool, error)

Get - returns an object from the cache

func (*Memcached) Put

func (mc *Memcached) Put(router, value, ttl, namespace []byte, fqnKeys ...string) error

Put - puts an object in the cache

type MetricsCollector

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

MetricsCollector - implements the interface zencached.MetricsCollector

func (*MetricsCollector) Count

func (mc *MetricsCollector) Count(metric string, value float64, tags ...string)

Count - does the count operation

func (*MetricsCollector) Maximum

func (mc *MetricsCollector) Maximum(metric string, value float64, tags ...string)

Maximum - does the max operation

Jump to

Keyboard shortcuts

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