Documentation
¶
Index ¶
- Variables
- 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
- type Handle
- type ParserHandle
- type ProtocolError
- type 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
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ExpectNumber = &ProtocolError{"Expect Number"} ExpectNewLine = &ProtocolError{"Expect Newline"} ExpectTypeChar = &ProtocolError{"Expect TypeChar"} InvalidNumArg = errors.New("TooManyArg") InvalidBulkSize = errors.New("Invalid bulk size") LineTooLong = errors.New("LineTooLong") MaxNumArg = 256 // A String value can be at max 512 Megabytes in length. redis:https://redis.io/topics/data-types MaxBulkSize = 512000000 MaxTelnetLine = 1 << 10 )
Functions ¶
func SendObjects ¶
Types ¶
type Handle ¶
type Handle struct { Parser *ParserHandle Writer *WriterHandle }
type ParserHandle ¶
func NewParserHandle ¶
func NewParserHandle(reader io.Reader) *ParserHandle
func (*ParserHandle) Commands ¶
func (r *ParserHandle) Commands() <-chan *Command
func (*ParserHandle) ReadCommand ¶
func (r *ParserHandle) ReadCommand() (*Command, error)
type ProtocolError ¶
type ProtocolError struct {
// contains filtered or unexported fields
}
func (*ProtocolError) Error ¶
func (p *ProtocolError) Error() string
type WriterHandle ¶
type WriterHandle struct {
// contains filtered or unexported fields
}
func NewWriterHandle ¶
func NewWriterHandle(sink io.Writer) *WriterHandle
func (*WriterHandle) Flush ¶
func (w *WriterHandle) Flush() error
func (*WriterHandle) RecursivelyWriteObjects ¶
func (w *WriterHandle) RecursivelyWriteObjects(objs ...interface{}) error
func (*WriterHandle) WriteBulk ¶
func (w *WriterHandle) WriteBulk(val []byte) error
func (*WriterHandle) WriteBulkString ¶
func (w *WriterHandle) WriteBulkString(s string) error
func (*WriterHandle) WriteBulkStrings ¶
func (w *WriterHandle) WriteBulkStrings(bulks []string) error
func (*WriterHandle) WriteBulks ¶
func (w *WriterHandle) WriteBulks(bulks ...[]byte) error
func (*WriterHandle) WriteError ¶
func (w *WriterHandle) WriteError(s string) error
func (*WriterHandle) WriteInt ¶
func (w *WriterHandle) WriteInt(val int64) error
func (*WriterHandle) WriteObjects ¶
func (w *WriterHandle) WriteObjects(objs ...interface{}) error
func (*WriterHandle) WriteSimpleString ¶
func (w *WriterHandle) WriteSimpleString(s string) error
Click to show internal directories.
Click to hide internal directories.