Documentation ¶
Index ¶
- Variables
- type PackerReader
- type Packet
- type PacketBuilder
- type RawDecoder
- func (pd *RawDecoder) ArrayLength() (int32, error)
- func (pd *RawDecoder) Bool() (bool, error)
- func (pd *RawDecoder) Bytes() ([]byte, error)
- func (pd *RawDecoder) Close() error
- func (pd *RawDecoder) CompactArrayLength() (uint64, error)
- func (pd *RawDecoder) CompactBytes() ([]byte, error)
- func (pd *RawDecoder) CompactNullableBytes() ([]byte, error)
- func (pd *RawDecoder) CompactNullableString() (*string, error)
- func (pd *RawDecoder) CompactRecords() ([]byte, error)
- func (pd *RawDecoder) CompactString() (string, error)
- func (pd *RawDecoder) Int16() (int16, error)
- func (pd *RawDecoder) Int32() (int32, error)
- func (pd *RawDecoder) Int64() (int64, error)
- func (pd *RawDecoder) Int8() (int8, error)
- func (pd *RawDecoder) NullableArrayLength() (*int32, error)
- func (pd *RawDecoder) NullableBytes() ([]byte, error)
- func (pd *RawDecoder) NullableString() (*string, error)
- func (pd *RawDecoder) Records() ([]byte, error)
- func (pd *RawDecoder) String() (string, error)
- func (pd *RawDecoder) UVarInt() (uint64, error)
- func (pd *RawDecoder) VarInt() (int64, error)
- type RawEncoder
- func (pe *RawEncoder) ArrayLength(in int)
- func (pe *RawEncoder) Bool(in bool)
- func (pe *RawEncoder) Bytes(in []byte)
- func (pe *RawEncoder) CompactArrayLength(in int)
- func (pe *RawEncoder) CompactBytes(in []byte)
- func (pe *RawEncoder) CompactNullableBytes(in []byte)
- func (pe *RawEncoder) CompactNullableString(in *string)
- func (pe *RawEncoder) CompactRecords(in []byte)
- func (pe *RawEncoder) CompactString(in string)
- func (pe *RawEncoder) Int16(in int16)
- func (pe *RawEncoder) Int32(in int32)
- func (pe *RawEncoder) Int64(in int64)
- func (pe *RawEncoder) Int8(in int8)
- func (pe *RawEncoder) NullableBytes(in []byte)
- func (pe *RawEncoder) NullableString(in *string)
- func (pe *RawEncoder) RawBytes(in []byte)
- func (pe *RawEncoder) Records(in []byte)
- func (pe *RawEncoder) String(in string)
- func (pe *RawEncoder) ToBytes() []byte
- func (pe *RawEncoder) UVarInt(in uint64) int
- func (pe *RawEncoder) VarInt(in int64) int
- type RequestHeader
- type ResponseHeader
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInsufficientData = errors.New("kafka: insufficient data to decode packet, more bytes expected")
View Source
var ErrInvalidBool = errors.New("kafka: invalid bool")
View Source
var ErrUVarIntOverflow = errors.New("kafka: uvarint overflow")
View Source
var ErrVarIntOverflow = errors.New("kafka: varint overflow")
Functions ¶
This section is empty.
Types ¶
type PackerReader ¶
type PackerReader struct {
*RawDecoder
}
func NewPacketReader ¶
func NewPacketReader(packet *Packet) *PackerReader
type Packet ¶
type Packet struct { ReqHeader *RequestHeader Key *int16 Version *int16 Data *bytes.Buffer }
func DecodePacket ¶
type PacketBuilder ¶
type PacketBuilder struct { Encoder RawEncoder // contains filtered or unexported fields }
func NewPacketBuilder ¶
func NewPacketBuilder(key int16, version int16) *PacketBuilder
func (*PacketBuilder) ToPacket ¶
func (builder *PacketBuilder) ToPacket() *Packet
type RawDecoder ¶
func (*RawDecoder) ArrayLength ¶
func (pd *RawDecoder) ArrayLength() (int32, error)
func (*RawDecoder) Bool ¶
func (pd *RawDecoder) Bool() (bool, error)
func (*RawDecoder) Bytes ¶
func (pd *RawDecoder) Bytes() ([]byte, error)
func (*RawDecoder) Close ¶
func (pd *RawDecoder) Close() error
func (*RawDecoder) CompactArrayLength ¶
func (pd *RawDecoder) CompactArrayLength() (uint64, error)
func (*RawDecoder) CompactBytes ¶
func (pd *RawDecoder) CompactBytes() ([]byte, error)
func (*RawDecoder) CompactNullableBytes ¶
func (pd *RawDecoder) CompactNullableBytes() ([]byte, error)
func (*RawDecoder) CompactNullableString ¶
func (pd *RawDecoder) CompactNullableString() (*string, error)
func (*RawDecoder) CompactRecords ¶
func (pd *RawDecoder) CompactRecords() ([]byte, error)
func (*RawDecoder) CompactString ¶
func (pd *RawDecoder) CompactString() (string, error)
func (*RawDecoder) Int16 ¶
func (pd *RawDecoder) Int16() (int16, error)
func (*RawDecoder) Int32 ¶
func (pd *RawDecoder) Int32() (int32, error)
func (*RawDecoder) Int64 ¶
func (pd *RawDecoder) Int64() (int64, error)
func (*RawDecoder) Int8 ¶
func (pd *RawDecoder) Int8() (int8, error)
func (*RawDecoder) NullableArrayLength ¶
func (pd *RawDecoder) NullableArrayLength() (*int32, error)
func (*RawDecoder) NullableBytes ¶
func (pd *RawDecoder) NullableBytes() ([]byte, error)
func (*RawDecoder) NullableString ¶
func (pd *RawDecoder) NullableString() (*string, error)
func (*RawDecoder) Records ¶
func (pd *RawDecoder) Records() ([]byte, error)
func (*RawDecoder) String ¶
func (pd *RawDecoder) String() (string, error)
func (*RawDecoder) UVarInt ¶
func (pd *RawDecoder) UVarInt() (uint64, error)
func (*RawDecoder) VarInt ¶
func (pd *RawDecoder) VarInt() (int64, error)
type RawEncoder ¶
func (*RawEncoder) ArrayLength ¶
func (pe *RawEncoder) ArrayLength(in int)
func (*RawEncoder) Bool ¶
func (pe *RawEncoder) Bool(in bool)
func (*RawEncoder) Bytes ¶
func (pe *RawEncoder) Bytes(in []byte)
func (*RawEncoder) CompactArrayLength ¶
func (pe *RawEncoder) CompactArrayLength(in int)
func (*RawEncoder) CompactBytes ¶
func (pe *RawEncoder) CompactBytes(in []byte)
func (*RawEncoder) CompactNullableBytes ¶
func (pe *RawEncoder) CompactNullableBytes(in []byte)
func (*RawEncoder) CompactNullableString ¶
func (pe *RawEncoder) CompactNullableString(in *string)
func (*RawEncoder) CompactRecords ¶
func (pe *RawEncoder) CompactRecords(in []byte)
func (*RawEncoder) CompactString ¶
func (pe *RawEncoder) CompactString(in string)
func (*RawEncoder) Int16 ¶
func (pe *RawEncoder) Int16(in int16)
func (*RawEncoder) Int32 ¶
func (pe *RawEncoder) Int32(in int32)
func (*RawEncoder) Int64 ¶
func (pe *RawEncoder) Int64(in int64)
func (*RawEncoder) Int8 ¶
func (pe *RawEncoder) Int8(in int8)
func (*RawEncoder) NullableBytes ¶
func (pe *RawEncoder) NullableBytes(in []byte)
func (*RawEncoder) NullableString ¶
func (pe *RawEncoder) NullableString(in *string)
func (*RawEncoder) RawBytes ¶
func (pe *RawEncoder) RawBytes(in []byte)
func (*RawEncoder) Records ¶
func (pe *RawEncoder) Records(in []byte)
func (*RawEncoder) String ¶
func (pe *RawEncoder) String(in string)
func (*RawEncoder) ToBytes ¶
func (pe *RawEncoder) ToBytes() []byte
func (*RawEncoder) UVarInt ¶
func (pe *RawEncoder) UVarInt(in uint64) int
func (*RawEncoder) VarInt ¶
func (pe *RawEncoder) VarInt(in int64) int
type RequestHeader ¶
func (*RequestHeader) Decode ¶
func (h *RequestHeader) Decode(pd *RawDecoder) (err error)
type ResponseHeader ¶
func (*ResponseHeader) Encode ¶
func (h *ResponseHeader) Encode(pe *RawEncoder) (err error)
Click to show internal directories.
Click to hide internal directories.