types

package
v0.0.0-...-bb2f46c Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Set     Verb = "set"
	Add          = "add"
	Replace      = "replace"
	Cas          = "cas"
	Incr         = "incr"
	Decr         = "decr"
)

Variables

View Source
var (
	// ErrCacheMiss means that a Get failed because the item wasn't present.
	ErrCacheMiss = errors.New("memcache: cache miss")

	// ErrCASConflict means that a CompareAndSwap call failed due to the
	// cached value being modified between the Get and the CompareAndSwap.
	// If the cached value was simply evicted rather than replaced,
	// ErrNotStored will be returned instead.
	ErrCASConflict = errors.New("memcache: compare-and-swap conflict")

	// ErrNotStored means that a conditional write operation (i.e. Add or
	// CompareAndSwap) failed because the condition was not satisfied.
	ErrNotStored = errors.New("memcache: item not stored")

	// ErrServer means that a server error occurred.
	ErrServerError = errors.New("memcache: server error")

	// ErrNoStats means that no statistics were available.
	ErrNoStats = errors.New("memcache: no statistics available")

	// ErrMalformedKey is returned when an invalid key is used.
	// Keys must be at maximum 250 bytes long and not
	// contain whitespace or control characters.
	ErrMalformedKey = errors.New("malformed: key is too long or contains invalid characters")

	// ErrNoServers is returned when no servers are configured or available.
	ErrNoServers = errors.New("memcache: no servers configured or available")

	ErrValueTooLarge  = errors.New("memcache: value to large")
	ErrInvalidArgs    = errors.New("memcache: invalid arguments")
	ErrValueNotStored = errors.New("memcache: value not stored")
	ErrNonNumeric     = errors.New("memcache: incr/decr called on non-numeric value")
	ErrAuthRequired   = errors.New("memcache: authentication required")
	ErrAuthContinue   = errors.New("memcache: authentication continue (unsupported)")
	ErrUnknownCommand = errors.New("memcache: unknown command")
	ErrOutOfMemory    = errors.New("memcache: out of memory")
	ErrUnknownError   = errors.New("memcache: unknown error from server")
	ErrBadMagic       = errors.New("memcache: bad magic number in response")
)

Functions

This section is empty.

Types

type Item

type Item struct {
	// Key is the Item's key (250 bytes maximum).
	Key string

	// Value is the Item's value.
	Value []byte

	// Flags are server-opaque flags whose semantics are entirely
	// up to the app.
	Flags uint32

	// Expiration is the cache expiration time, in seconds: either a relative
	// time from now (up to 1 month), or an absolute Unix epoch time.
	// Zero means the Item has no expiration time.
	Expiration int32

	// Compare and swap ID.
	Casid uint64
}

Item is an item to be got or stored in a memcached server.

type Verb

type Verb string

Jump to

Keyboard shortcuts

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