Versions in this module Expand all Collapse all v1 v1.0.3 Apr 29, 2023 Changes in this version + var ExpectNewLine = &ProtocolError + var ExpectNumber = &ProtocolError + var ExpectTypeChar = &ProtocolError + var InvalidBulkSize = errors.New("Invalid bulk size") + var InvalidNumArg = errors.New("TooManyArg") + var LineTooLong = errors.New("LineTooLong") + var MaxBulkSize = 512000000 + var MaxNumArg = 256 + var MaxTelnetLine = 1 << 10 + func SendBulk(w *bufio.Writer, val []byte) error + func SendBulkString(w *bufio.Writer, str string) error + func SendBulkStrings(w *bufio.Writer, strs []string) error + func SendBulks(w *bufio.Writer, vals [][]byte) error + func SendError(w *bufio.Writer, msg string) error + func SendInt(w *bufio.Writer, val int64) error + func SendObjects(w *bufio.Writer, vals []interface{}) error + func SendString(w *bufio.Writer, msg string) error + type Command struct + Argv [][]byte + Raw []byte + func (c *Command) ArgCount() int + func (c *Command) Get(index int) []byte + func (c *Command) IsLast() bool + type Handle struct + Parser *ParserHandle + Writer *WriterHandle + func NewHandle(reader io.Reader, writer io.Writer) *Handle + type ParserHandle struct + func NewParserHandle(reader io.Reader) *ParserHandle + func (r *ParserHandle) Commands() <-chan *Command + func (r *ParserHandle) ReadCommand() (*Command, error) + type ProtocolError struct + func (p *ProtocolError) Error() string + type WriterHandle struct + func NewWriterHandle(sink io.Writer) *WriterHandle + func (w *WriterHandle) Flush() error + func (w *WriterHandle) RecursivelyWriteObjects(objs ...interface{}) error + func (w *WriterHandle) Write(data []byte) (int, error) + func (w *WriterHandle) WriteBulk(val []byte) error + func (w *WriterHandle) WriteBulkString(s string) error + func (w *WriterHandle) WriteBulkStrings(bulks []string) error + func (w *WriterHandle) WriteBulks(bulks ...[]byte) error + func (w *WriterHandle) WriteError(s string) error + func (w *WriterHandle) WriteInt(val int64) error + func (w *WriterHandle) WriteObjects(objs ...interface{}) error + func (w *WriterHandle) WriteSimpleString(s string) error