Documentation ¶
Index ¶
- Variables
- func AsBulkBytes(r Resp, err error) ([]byte, error)
- func AsError(r Resp, err error) ([]byte, error)
- func AsInt(r Resp, err error) (int64, error)
- func AsString(r Resp, err error) ([]byte, error)
- func Encode(w *bufio.Writer, r Resp, flush bool) error
- func EncodeToBytes(r Resp) ([]byte, error)
- func EncodeToString(r Resp) (string, error)
- func MustEncode(w *bufio.Writer, r Resp)
- func MustEncodeToBytes(r Resp) []byte
- func MustHandlerTable(o interface{}) map[string]HandlerFunc
- func NewHandlerTable(o interface{}) (map[string]HandlerFunc, error)
- func ParseArgs(resp Resp) (cmd string, args [][]byte, err error)
- type Array
- type BulkBytes
- type Decoder
- type Error
- type HandlerFunc
- type HandlerTable
- type Int
- type Resp
- func AsArray(r Resp, err error) ([]Resp, error)
- func ChangeArgsToResp(cmd []byte, args [][]byte) (resp Resp)
- func Decode(r *bufio.Reader) (Resp, error)
- func DecodeFromBytes(p []byte) (Resp, error)
- func MustDecode(r *bufio.Reader) Resp
- func MustDecodeFromBytes(p []byte) Resp
- func MustDecodeOpt(d *Decoder) (Resp, int64)
- func NewCommand(cmd string, args ...interface{}) Resp
- type Server
- type String
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EncodeToBytes ¶
func EncodeToString ¶
func MustEncode ¶
func MustEncodeToBytes ¶
func MustHandlerTable ¶
func MustHandlerTable(o interface{}) map[string]HandlerFunc
func NewHandlerTable ¶
func NewHandlerTable(o interface{}) (map[string]HandlerFunc, error)
Types ¶
type HandlerFunc ¶
type HandlerTable ¶
type HandlerTable map[string]HandlerFunc
type Resp ¶
type Resp interface { }
func ChangeArgsToResp ¶
func DecodeFromBytes ¶
func MustDecode ¶
func MustDecodeFromBytes ¶
func MustDecodeOpt ¶
return the response and current reading offset
func NewCommand ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func MustServer ¶
func MustServer(o interface{}) *Server
func NewServerWithTable ¶
func NewServerWithTable(t HandlerTable) (*Server, error)
Click to show internal directories.
Click to hide internal directories.