Versions in this module Expand all Collapse all v0 v0.1.1 Jul 1, 2019 Changes in this version + var Encoding = binary.BigEndian + var ErrInsufficientData = errors.New("insufficient data to decode packet, more bytes expected") + var ErrIntOverflowInternal = fmt.Errorf("proto: integer overflow") + var ErrInvalidArrayLength = errors.New("invalid array length") + var ErrInvalidByteSliceLength = errors.New("invalid byteslice length") + var ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidStringLength = errors.New("invalid string length") + var Op_name = map[int32]string + var Op_value = map[string]int32 + func Decode(b []byte, in VersionedDecoder, version int16) error + func Encode(e Encoder) ([]byte, error) + type ByteDecoder struct + func NewDecoder(b []byte) *ByteDecoder + func (d *ByteDecoder) ArrayLength() (int, error) + func (d *ByteDecoder) Bool() (bool, error) + func (d *ByteDecoder) Bytes() ([]byte, error) + func (d *ByteDecoder) Int16() (int16, error) + func (d *ByteDecoder) Int32() (int32, error) + func (d *ByteDecoder) Int32Array() ([]int32, error) + func (d *ByteDecoder) Int64() (int64, error) + func (d *ByteDecoder) Int64Array() ([]int64, error) + func (d *ByteDecoder) Int8() (int8, error) + func (d *ByteDecoder) NullableString() (*string, error) + func (d *ByteDecoder) Offset() int + func (d *ByteDecoder) Pop() error + func (d *ByteDecoder) Push(pd PushDecoder) error + func (d *ByteDecoder) String() (string, error) + func (d *ByteDecoder) StringArray() ([]string, error) + type ByteEncoder struct + func NewByteEncoder(b []byte) *ByteEncoder + func (b *ByteEncoder) Bytes() []byte + func (e *ByteEncoder) Pop() + func (e *ByteEncoder) Push(pe PushEncoder) + func (e *ByteEncoder) PutArrayLength(in int) error + func (e *ByteEncoder) PutBool(in bool) + func (e *ByteEncoder) PutBytes(in []byte) error + func (e *ByteEncoder) PutInt16(in int16) + func (e *ByteEncoder) PutInt32(in int32) + func (e *ByteEncoder) PutInt32Array(in []int32) error + func (e *ByteEncoder) PutInt64(in int64) + func (e *ByteEncoder) PutInt64Array(in []int64) error + func (e *ByteEncoder) PutInt8(in int8) + func (e *ByteEncoder) PutNullableString(in *string) error + func (e *ByteEncoder) PutRawBytes(in []byte) error + func (e *ByteEncoder) PutString(in string) error + func (e *ByteEncoder) PutStringArray(in []string) error + type CRCField struct + StartOffset int + func (f *CRCField) Check(curOffset int, buf []byte) error + func (f *CRCField) Fill(curOffset int, buf []byte) error + func (f *CRCField) ReserveSize() int + func (f *CRCField) SaveOffset(in int) + type ChangeLeaderOp struct + Leader string + Name string + Subject string + func (*ChangeLeaderOp) Descriptor() ([]byte, []int) + func (*ChangeLeaderOp) ProtoMessage() + func (m *ChangeLeaderOp) GetLeader() string + func (m *ChangeLeaderOp) GetName() string + func (m *ChangeLeaderOp) GetSubject() string + func (m *ChangeLeaderOp) Marshal() (dAtA []byte, err error) + func (m *ChangeLeaderOp) MarshalTo(dAtA []byte) (int, error) + func (m *ChangeLeaderOp) Reset() + func (m *ChangeLeaderOp) Size() (n int) + func (m *ChangeLeaderOp) String() string + func (m *ChangeLeaderOp) Unmarshal(dAtA []byte) error + type CreateStreamOp struct + Stream *Stream + func (*CreateStreamOp) Descriptor() ([]byte, []int) + func (*CreateStreamOp) ProtoMessage() + func (m *CreateStreamOp) GetStream() *Stream + func (m *CreateStreamOp) Marshal() (dAtA []byte, err error) + func (m *CreateStreamOp) MarshalTo(dAtA []byte) (int, error) + func (m *CreateStreamOp) Reset() + func (m *CreateStreamOp) Size() (n int) + func (m *CreateStreamOp) String() string + func (m *CreateStreamOp) Unmarshal(dAtA []byte) error + type Decoder interface + Decode func(d PacketDecoder) error + type Encoder interface + Encode func(e PacketEncoder) error + type Error struct + Code uint32 + Msg string + func (*Error) Descriptor() ([]byte, []int) + func (*Error) ProtoMessage() + func (m *Error) GetCode() uint32 + func (m *Error) GetMsg() string + func (m *Error) Marshal() (dAtA []byte, err error) + func (m *Error) MarshalTo(dAtA []byte) (int, error) + func (m *Error) Reset() + func (m *Error) Size() (n int) + func (m *Error) String() string + func (m *Error) Unmarshal(dAtA []byte) error + type ExpandISROp struct + Leader string + LeaderEpoch uint64 + Name string + ReplicaToAdd string + Subject string + func (*ExpandISROp) Descriptor() ([]byte, []int) + func (*ExpandISROp) ProtoMessage() + func (m *ExpandISROp) GetLeader() string + func (m *ExpandISROp) GetLeaderEpoch() uint64 + func (m *ExpandISROp) GetName() string + func (m *ExpandISROp) GetReplicaToAdd() string + func (m *ExpandISROp) GetSubject() string + func (m *ExpandISROp) Marshal() (dAtA []byte, err error) + func (m *ExpandISROp) MarshalTo(dAtA []byte) (int, error) + func (m *ExpandISROp) Reset() + func (m *ExpandISROp) Size() (n int) + func (m *ExpandISROp) String() string + func (m *ExpandISROp) Unmarshal(dAtA []byte) error + type LenEncoder struct + Length int + func (e *LenEncoder) Pop() + func (e *LenEncoder) Push(pe PushEncoder) + func (e *LenEncoder) PutArrayLength(in int) error + func (e *LenEncoder) PutBool(in bool) + func (e *LenEncoder) PutBytes(in []byte) error + func (e *LenEncoder) PutInt16(in int16) + func (e *LenEncoder) PutInt32(in int32) + func (e *LenEncoder) PutInt32Array(in []int32) error + func (e *LenEncoder) PutInt64(in int64) + func (e *LenEncoder) PutInt64Array(in []int64) error + func (e *LenEncoder) PutInt8(in int8) + func (e *LenEncoder) PutNullableString(in *string) error + func (e *LenEncoder) PutRawBytes(in []byte) error + func (e *LenEncoder) PutString(in string) error + func (e *LenEncoder) PutStringArray(in []string) error + type Message struct + AckInbox string + AckPolicy client.AckPolicy + Attributes int8 + CorrelationID string + Crc int32 + Headers map[string][]byte + Key []byte + MagicByte int8 + Timestamp int64 + Value []byte + func (m *Message) Decode(d PacketDecoder) error + func (m *Message) Encode(e PacketEncoder) error + type MetadataSnapshot struct + Streams []*Stream + func (*MetadataSnapshot) Descriptor() ([]byte, []int) + func (*MetadataSnapshot) ProtoMessage() + func (m *MetadataSnapshot) GetStreams() []*Stream + func (m *MetadataSnapshot) Marshal() (dAtA []byte, err error) + func (m *MetadataSnapshot) MarshalTo(dAtA []byte) (int, error) + func (m *MetadataSnapshot) Reset() + func (m *MetadataSnapshot) Size() (n int) + func (m *MetadataSnapshot) String() string + func (m *MetadataSnapshot) Unmarshal(dAtA []byte) error + type Op int32 + const Op_CHANGE_LEADER + const Op_CREATE_STREAM + const Op_EXPAND_ISR + const Op_REPORT_LEADER + const Op_SHRINK_ISR + func (Op) EnumDescriptor() ([]byte, []int) + func (x Op) String() string + type PacketDecoder interface + ArrayLength func() (int, error) + Bool func() (bool, error) + Bytes func() ([]byte, error) + Int16 func() (int16, error) + Int32 func() (int32, error) + Int32Array func() ([]int32, error) + Int64 func() (int64, error) + Int64Array func() ([]int64, error) + Int8 func() (int8, error) + NullableString func() (*string, error) + Pop func() error + Push func(pd PushDecoder) error + String func() (string, error) + StringArray func() ([]string, error) + type PacketEncoder interface + Pop func() + Push func(pe PushEncoder) + PutArrayLength func(in int) error + PutBool func(in bool) + PutBytes func(in []byte) error + PutInt16 func(in int16) + PutInt32 func(in int32) + PutInt32Array func(in []int32) error + PutInt64 func(in int64) + PutInt64Array func(in []int64) error + PutInt8 func(in int8) + PutNullableString func(in *string) error + PutRawBytes func(in []byte) error + PutString func(in string) error + PutStringArray func(in []string) error + type PropagatedRequest struct + CreateStreamOp *proto2.CreateStreamRequest + ExpandISROp *ExpandISROp + Op Op + ReportLeaderOp *ReportLeaderOp + ShrinkISROp *ShrinkISROp + func (*PropagatedRequest) Descriptor() ([]byte, []int) + func (*PropagatedRequest) ProtoMessage() + func (m *PropagatedRequest) GetCreateStreamOp() *proto2.CreateStreamRequest + func (m *PropagatedRequest) GetExpandISROp() *ExpandISROp + func (m *PropagatedRequest) GetOp() Op + func (m *PropagatedRequest) GetReportLeaderOp() *ReportLeaderOp + func (m *PropagatedRequest) GetShrinkISROp() *ShrinkISROp + func (m *PropagatedRequest) Marshal() (dAtA []byte, err error) + func (m *PropagatedRequest) MarshalTo(dAtA []byte) (int, error) + func (m *PropagatedRequest) Reset() + func (m *PropagatedRequest) Size() (n int) + func (m *PropagatedRequest) String() string + func (m *PropagatedRequest) Unmarshal(dAtA []byte) error + type PropagatedResponse struct + CreateStreamResp *proto2.CreateStreamResponse + Error *Error + Op Op + func (*PropagatedResponse) Descriptor() ([]byte, []int) + func (*PropagatedResponse) ProtoMessage() + func (m *PropagatedResponse) GetCreateStreamResp() *proto2.CreateStreamResponse + func (m *PropagatedResponse) GetError() *Error + func (m *PropagatedResponse) GetOp() Op + func (m *PropagatedResponse) Marshal() (dAtA []byte, err error) + func (m *PropagatedResponse) MarshalTo(dAtA []byte) (int, error) + func (m *PropagatedResponse) Reset() + func (m *PropagatedResponse) Size() (n int) + func (m *PropagatedResponse) String() string + func (m *PropagatedResponse) Unmarshal(dAtA []byte) error + type PushDecoder interface + Check func(curOffset int, buf []byte) error + Fill func(curOffset int, buf []byte) error + ReserveSize func() int + SaveOffset func(in int) + type PushEncoder interface + Fill func(curOffset int, buf []byte) error + ReserveSize func() int + SaveOffset func(in int) + type RaftJoinRequest struct + NodeAddr string + NodeID string + func (*RaftJoinRequest) Descriptor() ([]byte, []int) + func (*RaftJoinRequest) ProtoMessage() + func (m *RaftJoinRequest) GetNodeAddr() string + func (m *RaftJoinRequest) GetNodeID() string + func (m *RaftJoinRequest) Marshal() (dAtA []byte, err error) + func (m *RaftJoinRequest) MarshalTo(dAtA []byte) (int, error) + func (m *RaftJoinRequest) Reset() + func (m *RaftJoinRequest) Size() (n int) + func (m *RaftJoinRequest) String() string + func (m *RaftJoinRequest) Unmarshal(dAtA []byte) error + type RaftJoinResponse struct + Error string + func (*RaftJoinResponse) Descriptor() ([]byte, []int) + func (*RaftJoinResponse) ProtoMessage() + func (m *RaftJoinResponse) GetError() string + func (m *RaftJoinResponse) Marshal() (dAtA []byte, err error) + func (m *RaftJoinResponse) MarshalTo(dAtA []byte) (int, error) + func (m *RaftJoinResponse) Reset() + func (m *RaftJoinResponse) Size() (n int) + func (m *RaftJoinResponse) String() string + func (m *RaftJoinResponse) Unmarshal(dAtA []byte) error + type RaftLog struct + ChangeLeaderOp *ChangeLeaderOp + CreateStreamOp *CreateStreamOp + ExpandISROp *ExpandISROp + Op Op + ShrinkISROp *ShrinkISROp + func (*RaftLog) Descriptor() ([]byte, []int) + func (*RaftLog) ProtoMessage() + func (m *RaftLog) GetChangeLeaderOp() *ChangeLeaderOp + func (m *RaftLog) GetCreateStreamOp() *CreateStreamOp + func (m *RaftLog) GetExpandISROp() *ExpandISROp + func (m *RaftLog) GetOp() Op + func (m *RaftLog) GetShrinkISROp() *ShrinkISROp + func (m *RaftLog) Marshal() (dAtA []byte, err error) + func (m *RaftLog) MarshalTo(dAtA []byte) (int, error) + func (m *RaftLog) Reset() + func (m *RaftLog) Size() (n int) + func (m *RaftLog) String() string + func (m *RaftLog) Unmarshal(dAtA []byte) error + type ReplicationRequest struct + Offset int64 + ReplicaID string + func (*ReplicationRequest) Descriptor() ([]byte, []int) + func (*ReplicationRequest) ProtoMessage() + func (m *ReplicationRequest) GetOffset() int64 + func (m *ReplicationRequest) GetReplicaID() string + func (m *ReplicationRequest) Marshal() (dAtA []byte, err error) + func (m *ReplicationRequest) MarshalTo(dAtA []byte) (int, error) + func (m *ReplicationRequest) Reset() + func (m *ReplicationRequest) Size() (n int) + func (m *ReplicationRequest) String() string + func (m *ReplicationRequest) Unmarshal(dAtA []byte) error + type ReportLeaderOp struct + Leader string + LeaderEpoch uint64 + Name string + Replica string + Subject string + func (*ReportLeaderOp) Descriptor() ([]byte, []int) + func (*ReportLeaderOp) ProtoMessage() + func (m *ReportLeaderOp) GetLeader() string + func (m *ReportLeaderOp) GetLeaderEpoch() uint64 + func (m *ReportLeaderOp) GetName() string + func (m *ReportLeaderOp) GetReplica() string + func (m *ReportLeaderOp) GetSubject() string + func (m *ReportLeaderOp) Marshal() (dAtA []byte, err error) + func (m *ReportLeaderOp) MarshalTo(dAtA []byte) (int, error) + func (m *ReportLeaderOp) Reset() + func (m *ReportLeaderOp) Size() (n int) + func (m *ReportLeaderOp) String() string + func (m *ReportLeaderOp) Unmarshal(dAtA []byte) error + type ServerInfoRequest struct + Id string + func (*ServerInfoRequest) Descriptor() ([]byte, []int) + func (*ServerInfoRequest) ProtoMessage() + func (m *ServerInfoRequest) GetId() string + func (m *ServerInfoRequest) Marshal() (dAtA []byte, err error) + func (m *ServerInfoRequest) MarshalTo(dAtA []byte) (int, error) + func (m *ServerInfoRequest) Reset() + func (m *ServerInfoRequest) Size() (n int) + func (m *ServerInfoRequest) String() string + func (m *ServerInfoRequest) Unmarshal(dAtA []byte) error + type ServerInfoResponse struct + Host string + Id string + Port int32 + func (*ServerInfoResponse) Descriptor() ([]byte, []int) + func (*ServerInfoResponse) ProtoMessage() + func (m *ServerInfoResponse) GetHost() string + func (m *ServerInfoResponse) GetId() string + func (m *ServerInfoResponse) GetPort() int32 + func (m *ServerInfoResponse) Marshal() (dAtA []byte, err error) + func (m *ServerInfoResponse) MarshalTo(dAtA []byte) (int, error) + func (m *ServerInfoResponse) Reset() + func (m *ServerInfoResponse) Size() (n int) + func (m *ServerInfoResponse) String() string + func (m *ServerInfoResponse) Unmarshal(dAtA []byte) error + type ServerState struct + ServerID string + func (*ServerState) Descriptor() ([]byte, []int) + func (*ServerState) ProtoMessage() + func (m *ServerState) GetServerID() string + func (m *ServerState) Marshal() (dAtA []byte, err error) + func (m *ServerState) MarshalTo(dAtA []byte) (int, error) + func (m *ServerState) Reset() + func (m *ServerState) Size() (n int) + func (m *ServerState) String() string + func (m *ServerState) Unmarshal(dAtA []byte) error + type ShrinkISROp struct + Leader string + LeaderEpoch uint64 + Name string + ReplicaToRemove string + Subject string + func (*ShrinkISROp) Descriptor() ([]byte, []int) + func (*ShrinkISROp) ProtoMessage() + func (m *ShrinkISROp) GetLeader() string + func (m *ShrinkISROp) GetLeaderEpoch() uint64 + func (m *ShrinkISROp) GetName() string + func (m *ShrinkISROp) GetReplicaToRemove() string + func (m *ShrinkISROp) GetSubject() string + func (m *ShrinkISROp) Marshal() (dAtA []byte, err error) + func (m *ShrinkISROp) MarshalTo(dAtA []byte) (int, error) + func (m *ShrinkISROp) Reset() + func (m *ShrinkISROp) Size() (n int) + func (m *ShrinkISROp) String() string + func (m *ShrinkISROp) Unmarshal(dAtA []byte) error + type SizeField struct + StartOffset int + func (s *SizeField) Check(curOffset int, buf []byte) error + func (s *SizeField) Fill(curOffset int, buf []byte) error + func (s *SizeField) ReserveSize() int + func (s *SizeField) SaveOffset(in int) + type Stream struct + Epoch uint64 + Group string + Isr []string + Leader string + LeaderEpoch uint64 + Name string + Replicas []string + ReplicationFactor int32 + Subject string + func (*Stream) Descriptor() ([]byte, []int) + func (*Stream) ProtoMessage() + func (m *Stream) GetEpoch() uint64 + func (m *Stream) GetGroup() string + func (m *Stream) GetIsr() []string + func (m *Stream) GetLeader() string + func (m *Stream) GetLeaderEpoch() uint64 + func (m *Stream) GetName() string + func (m *Stream) GetReplicas() []string + func (m *Stream) GetReplicationFactor() int32 + func (m *Stream) GetSubject() string + func (m *Stream) Marshal() (dAtA []byte, err error) + func (m *Stream) MarshalTo(dAtA []byte) (int, error) + func (m *Stream) Reset() + func (m *Stream) Size() (n int) + func (m *Stream) String() string + func (m *Stream) Unmarshal(dAtA []byte) error + type StreamStatusRequest struct + Name string + Subject string + func (*StreamStatusRequest) Descriptor() ([]byte, []int) + func (*StreamStatusRequest) ProtoMessage() + func (m *StreamStatusRequest) GetName() string + func (m *StreamStatusRequest) GetSubject() string + func (m *StreamStatusRequest) Marshal() (dAtA []byte, err error) + func (m *StreamStatusRequest) MarshalTo(dAtA []byte) (int, error) + func (m *StreamStatusRequest) Reset() + func (m *StreamStatusRequest) Size() (n int) + func (m *StreamStatusRequest) String() string + func (m *StreamStatusRequest) Unmarshal(dAtA []byte) error + type StreamStatusResponse struct + Exists bool + IsLeader bool + func (*StreamStatusResponse) Descriptor() ([]byte, []int) + func (*StreamStatusResponse) ProtoMessage() + func (m *StreamStatusResponse) GetExists() bool + func (m *StreamStatusResponse) GetIsLeader() bool + func (m *StreamStatusResponse) Marshal() (dAtA []byte, err error) + func (m *StreamStatusResponse) MarshalTo(dAtA []byte) (int, error) + func (m *StreamStatusResponse) Reset() + func (m *StreamStatusResponse) Size() (n int) + func (m *StreamStatusResponse) String() string + func (m *StreamStatusResponse) Unmarshal(dAtA []byte) error + type VersionedDecoder interface + Decode func(d PacketDecoder, version int16) error