Versions in this module Expand all Collapse all v1 v1.0.0 Aug 4, 2023 Changes in this version + func ParseCommand(r io.Reader) (any, error) + type Command byte + const CmdDel + const CmdGet + const CmdJoin + const CmdNone + const CmdSet + type CommandDelete struct + Key []byte + func (c *CommandDelete) Bytes() ([]byte, error) + type CommandGet struct + Key []byte + func (c *CommandGet) Bytes() ([]byte, error) + type CommandJoin struct + type CommandSet struct + Key []byte + TTL int + Value []byte + func (c *CommandSet) Bytes() ([]byte, error) + type ResponseDelete struct + Status Status + func ParseDeleteResponse(r io.Reader) (*ResponseDelete, error) + func (r *ResponseDelete) Bytes() ([]byte, error) + type ResponseGet struct + Status Status + Value []byte + func ParseGetResponse(r io.Reader) (*ResponseGet, error) + func (r *ResponseGet) Bytes() ([]byte, error) + type ResponseSet struct + Status Status + func ParseSetResponse(r io.Reader) (*ResponseSet, error) + func (r *ResponseSet) Bytes() ([]byte, error) + type Status byte + const StatusError + const StatusKeyNotFound + const StatusNone + const StatusNotLeader + const StatusOK + func (s Status) String() string