Documentation ¶
Overview ¶
Package wire implements subset of YT wire protocol used by RPC proxy.
Index ¶
- Variables
- func Encode(items []interface{}) (NameTable, []Row, error)
- func MarshalRowset(rowset []Row) ([]byte, error)
- type NameTable
- type NameTableEntry
- type ReflectTypeError
- type Row
- type TypesMismatchError
- type UnsupportedTypeError
- type Value
- func NewAny(id uint16, b []byte) (v Value)
- func NewBool(id uint16, b bool) (v Value)
- func NewBytes(id uint16, b []byte) (v Value)
- func NewFloat64(id uint16, f float64) (v Value)
- func NewInt64(id uint16, i int64) (v Value)
- func NewNull(id uint16) (v Value)
- func NewUint64(id uint16, i uint64) (v Value)
- type ValueType
- type WireDecoder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIntegerOverflow = xerrors.New("wire: integer overflow") ErrFloat32Overflow = xerrors.New("wire: float32 overflow") )
Functions ¶
func MarshalRowset ¶
Types ¶
type NameTable ¶
type NameTable []NameTableEntry
type NameTableEntry ¶
type NameTableEntry struct {
Name string
}
type ReflectTypeError ¶
type ReflectTypeError struct { UserType reflect.Type WireType ValueType Struct string Field string }
func (*ReflectTypeError) Error ¶
func (e *ReflectTypeError) Error() string
type Row ¶
type Row []Value
func EncodePivotKeys ¶
func UnmarshalRowset ¶
UnmarshalRowset decodes rowset from YT wire format.
Returned values of type Bytes and Any point directly into the input buffer.
type TypesMismatchError ¶
func (*TypesMismatchError) Error ¶
func (e *TypesMismatchError) Error() string
type UnsupportedTypeError ¶
func (*UnsupportedTypeError) Error ¶
func (e *UnsupportedTypeError) Error() string
type Value ¶
type Value struct { ID uint16 Type ValueType Aggregate bool // contains filtered or unexported fields }
func NewFloat64 ¶
type ValueType ¶
type ValueType uint8
const ( // Subtract 2 from all constants, such that Null is represented by zero. TypeNull ValueType = 0x02 - typeOffset TypeInt64 ValueType = 0x03 - typeOffset TypeUint64 ValueType = 0x04 - typeOffset TypeFloat64 ValueType = 0x05 - typeOffset TypeBool ValueType = 0x06 - typeOffset TypeBytes ValueType = 0x10 - typeOffset TypeAny ValueType = 0x11 - typeOffset )
type WireDecoder ¶
type WireDecoder struct {
NameTable NameTable
}
func NewDecoder ¶
func NewDecoder(table NameTable) *WireDecoder
func (*WireDecoder) UnmarshalRow ¶
func (d *WireDecoder) UnmarshalRow(row Row, v interface{}) error
Click to show internal directories.
Click to hide internal directories.