Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ERROR means the client sent a nonexistent command name. ErrError = errs.New("ERROR") // CLIENT_ERROR // means some sort of client error in the input line, i.e. the input // doesn't conform to the protocol in some way. <error> is a // human-readable error string. ErrBadRequest = errs.New("CLIENT_ERROR bad request") ErrBadKey = errs.New("CLIENT_ERROR key invalid") ErrBadFlags = errs.New("CLIENT_ERROR flags is not a valid integer") ErrBadExptime = errs.New("CLIENT_ERROR exptime is not a valid integer") ErrBadLength = errs.New("CLIENT_ERROR length is not a valid integer") ErrBadCas = errs.New("CLIENT_ERROR cas is not a valid integer") // SERVER_ERROR // means some sort of server error prevents the server from carrying // out the command. <error> is a human-readable error string. In cases // of severe server errors, which make it impossible to continue // serving the client (this shouldn't normally happen), the server will // close the connection after sending the error line. This is the only // case in which the server closes a connection to a client. ErrClosed = errs.New("SERVER_ERROR connection closed") ErrPingerPong = errs.New("SERVER_ERROR Pinger pong unexpected") ErrAssertReq = errs.New("SERVER_ERROR assert request not ok") ErrBadResponse = errs.New("SERVER_ERROR bad response") )
errors
Functions ¶
Types ¶
type MCRequest ¶
type MCRequest struct {
// contains filtered or unexported fields
}
MCRequest is the mc client Msg type and data. Storage commands:
<command name> <key> <flags> <exptime> <bytes> [noreply]\r\n cas <key> <flags> <exptime> <bytes> <cas unique> [noreply]\r\n
Retrieval commands:
get|gets <key>*\r\n
Deletion command:
delete <key> [noreply]\r\n
Increment/Decrement:
incr|decr <key> <value> [noreply]\r\n
Touch:
touch <key> <exptime> [noreply]\r\n
Get And Touch:
gat|gats <exptime> <key>*\r\n
type RequestType ¶
type RequestType byte
RequestType is the protocol-agnostic identifier for the command
const ( RequestTypeUnknown RequestType = iota RequestTypeSet RequestTypeAdd RequestTypeReplace RequestTypeAppend RequestTypePrepend RequestTypeCas RequestTypeGet RequestTypeGets RequestTypeDelete RequestTypeIncr RequestTypeDecr RequestTypeTouch RequestTypeGat RequestTypeGats )
all memcache Msg type
func (RequestType) String ¶
func (rt RequestType) String() string
Click to show internal directories.
Click to hide internal directories.