Expand description
Memcached text-protocol parser.
The parser is a single byte-driven state machine for requests
and another for responses, faithfully reproducing the state set
and transitions of memcache_parse_req and memcache_parse_rsp
in the reference engine. It mutates a Msg in place: the
command tag, key list, value-length accumulator, and parser
cursor are written back so the streaming caller can resume the
machine on more bytes without re-allocating state.
The parsers MUST NOT panic on any input. Invalid bytes are
reported via MsgParseResult::Error.
Structs§
- HashTag
- Optional hash tag delimiters. When set, parsed keys carry the inner range between the delimiters as the routing tag.
Enums§
- ReqState
- State alphabet for
memcache_parse_req. - RspState
- State alphabet for
memcache_parse_rsp.
Constants§
- MEMCACHE_
MAX_ KEY_ LENGTH - Maximum allowed Memcached key length in bytes.
Functions§
- memcache_
parse_ req - Parse a Memcached request from
inputand updaterin place. - memcache_
parse_ req_ tagged - Variant of
memcache_parse_reqthat accepts an explicit hash-tag configuration. - memcache_
parse_ rsp - Parse a Memcached response from
inputand updaterin place.