Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MaxCommandInfoBytes = 512 RspErr = []byte("ERROR\r\n") RspStored = []byte("STORED\r\n") RspNotStored = []byte("NOT_STORED\r\n") RspExists = []byte("EXISTS\r\n") RspNotFound = []byte("NOT_FOUND\r\n") RspDeleted = []byte("DELETED\r\n") RspEnd = []byte("END\r\n") RspTouched = []byte("TOUCHED\r\n") EOL = []byte("\r\n") )
View Source
var (
ErrNeedMoreData = errors.New("need more data")
)
Functions ¶
func MakeRspClientErr ¶
func MakeRspServerErr ¶
Types ¶
type CommandInfo ¶
type CommandInfo struct { Cmd string Key string Keys []string // for retrieval commands Delta uint64 // for incr/decr Flags uint32 Exptime uint32 PayloadLen int64 CasUnique int64 NoReply bool }
func ParseCommand ¶
func ParseCommand(data []byte) (advance int, cmdinfo *CommandInfo, err error)
ParseCommand parses cmd from `data` and return CommandInfo return ErrNeedMoreData if data not contains '\n' implements: https://github.com/memcached/memcached/blob/master/doc/protocol.txt
Click to show internal directories.
Click to hide internal directories.