proto

package
v0.0.0-...-9395666 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RespString            = '+' // +<length>\n<bytes>\n
	RespArray             = '&' // &<c>\n<elements>
	RespAnyArray          = '~' // ~<c>\n<elements>
	RespFlatArray         = '_' // _<c>\n<elements>
	RespTypedArray        = '@' // @<c>\n<elements>
	RespTypedNonNullArray = '^' // ^<c>\n<elements>
	RespInt               = ':' // :<length>\n<number>
	RespFloat             = '%' // %<length>\n<bytes>\n
	RespBlob              = '?' // ?<length>\n<bytes>
	RespStatus            = '!' // !<length>\n<statusCode>\n
	RespMetaFrame         = '*' // *<number>\n
)
View Source
const ActionError = SkytableError("skytable: action error")
View Source
const AuthnRealmError = SkytableError("skytable: authn realm error")
View Source
const BadCredentials = SkytableError("skytable: bad credentials")
View Source
const EncodingError = SkytableError("skytable: encoding error")
View Source
const Nil = SkytableError("skytable: nil")
View Source
const OtherError = SkytableError("skytable: other error")
View Source
const OverwriteError = SkytableError("skytable: overwrite error")
View Source
const PacketError = SkytableError("skytable: packet error")
View Source
const ServerError = SkytableError("skytable: server error")
View Source
const UnknownDataTypeError = SkytableError("skytable: unknown data type")
View Source
const WrongTypeError = SkytableError("skytable: wrong type error")

Variables

Functions

func ParseErrorReply

func ParseErrorReply(line []byte) error

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(rd io.Reader) *Reader

func (*Reader) Buffered

func (r *Reader) Buffered() int

func (*Reader) Peek

func (r *Reader) Peek(n int) ([]byte, error)

func (*Reader) PeekReplyType

func (r *Reader) PeekReplyType() (byte, error)

PeekReplyType returns the data type of the next response without advancing the Reader, and discard the attribute type.

func (*Reader) ReadArrayLen

func (r *Reader) ReadArrayLen() (int, error)

func (*Reader) ReadBytes

func (r *Reader) ReadBytes() ([]byte, error)

func (*Reader) ReadFloat

func (r *Reader) ReadFloat() (float32, error)

func (*Reader) ReadInt

func (r *Reader) ReadInt() (int64, error)

func (*Reader) ReadLine

func (r *Reader) ReadLine() ([]byte, error)

ReadLine Return a valid reply, it will check the protocol or skytable error, and discard the attribute type.

func (*Reader) ReadMetaFrame

func (r *Reader) ReadMetaFrame() (int, error)

func (*Reader) ReadReply

func (r *Reader) ReadReply() (interface{}, error)

func (*Reader) ReadSlice

func (r *Reader) ReadSlice() ([]interface{}, error)

func (*Reader) ReadStatus

func (r *Reader) ReadStatus() (int64, error)

func (*Reader) ReadString

func (r *Reader) ReadString() (string, error)

func (*Reader) Reset

func (r *Reader) Reset(rd io.Reader)

type SkytableError

type SkytableError string

func (SkytableError) Error

func (e SkytableError) Error() string

func (SkytableError) SkytableError

func (SkytableError) SkytableError()

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(wr writer) *Writer

func (*Writer) WriteArg

func (w *Writer) WriteArg(v interface{}) error

func (*Writer) WriteArgs

func (w *Writer) WriteArgs(args []interface{}) error

func (*Writer) WriteMetaFrame

func (w *Writer) WriteMetaFrame(n int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL