Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxKeySize = 250 MaxItemSize = 128 * (1 << 20) // 128 MB. DefaultMaxItemSize = 1 << 20 MaxCommandSize = 1 << 12 MaxRelativeExptime = 60 * 60 * 24 * 30 // 30 days. Separator = "\r\n" SetCommand = "set" GetCommand = "get" GetsCommand = "gets" DeleteCommand = "delete" NoReplyOption = "noreply" StoredResponse = "STORED" ValueResponse = "VALUE" EndResponse = "END" DeletedResponse = "DELETED" NotFoundResponse = "NOT_FOUND" ErrorResponse = "ERROR" ClientErrorResponse = "CLIENT_ERROR" ServerErrorResponse = "SERVER_ERROR" // Implementation specific consts. InBufferSize = 16 * (1 << 10) OutBufferSize = 16 * (1 << 10) )
View Source
const DefaultAddr = ":11211"
View Source
const SnapshotCommand = "\x00 LOG FILE STARTS WITH GOB ENCODED CACHE SNAPSHOT \x00" + Separator
SnapshotCommand indicate that there is cache snapshot after it. First byte is invalid for any memcached command, so it is possible to understand is command SnapshotCommand by first byte.
Variables ¶
View Source
var ( ErrTooLargeKey = errors.New("too large key") ErrTooLargeItem = errors.New("too large item") ErrInvalidOption = errors.New("invalid option") ErrTooManyFields = errors.New("too many fields") ErrMoreFieldsRequired = errors.New("more fields required") ErrTooLargeCommand = errors.New("command length is too big") ErrEmptyCommand = errors.New("empty command") ErrFieldsParseError = errors.New("fields parse error ") ErrInvalidLineSeparator = errors.New("invalid line separator") ErrInvalidCharInKey = errors.New("key contains invalid characters") )
View Source
var ErrStoped = errors.New("memcached server have been stoped")
Functions ¶
This section is empty.
Types ¶
type CorruptedError ¶
type CorruptedError struct {
Err error
}
func (*CorruptedError) Error ¶
func (e *CorruptedError) Error() string
Directories
¶
Path | Synopsis |
---|---|
Package cache provide LRU cache for memcached protocol.
|
Package cache provide LRU cache for memcached protocol. |
cmd
|
|
internal
|
|
Package log contains simple leveled logging implementation on top of stdlib logger.
|
Package log contains simple leveled logging implementation on top of stdlib logger. |
Package recycle contains utilities for recyclable, concurrent read only memory usage.
|
Package recycle contains utilities for recyclable, concurrent read only memory usage. |
Click to show internal directories.
Click to hide internal directories.