Documentation ¶
Index ¶
- Constants
- Variables
- type BasicHeader
- type Bundle
- type Chunk
- type ConsumeRequest
- type ConsumeResponse
- type DiscoverPartitionsRequest
- type DiscoverPartitionsResponse
- type FetchRequestTopic
- type FetchRequestTopicPartition
- type Log
- type Message
- type MessageError
- type Partition
- type Ping
- type Topic
- type TopicHeader
- type Type
Constants ¶
View Source
const SizeOfBasicHeader = binary.SizeOfUint8Bytes + binary.SizeOfUint32Bytes
SizeOfBasicHeader = msgId:u8 + payload size:u32 .
Variables ¶
View Source
var ( ErrHighWaterMarkExceeded = errors.New("high water mark exceeded") ErrEmptyResponse = errors.New("empty tank response") )
Functions ¶
This section is empty.
Types ¶
type BasicHeader ¶
BasicHeader struct.
func ParseBasicHeader ¶
func ParseBasicHeader(prs binary.Parser, b []byte) (BasicHeader, error)
ParseBasicHeader parses a basic header from a slice.
func PeakBasicHeader ¶
func PeakBasicHeader(rb *binary.ReadBuffer) (BasicHeader, error)
PeakBasicHeader parses the first 5 bytes into basicHeader without discarding the bytes from read buffer.
func (*BasicHeader) ReadHeader ¶
func (b *BasicHeader) ReadHeader(rb *binary.ReadBuffer, payloadSize uint32) error
ReadHeader parses the first 5 bytes into basicHeader.
type ConsumeRequest ¶
type ConsumeRequest struct { ClientVersion uint16 RequestID uint32 Client string MaxWaitMS uint64 MinBytes uint32 Topics []FetchRequestTopic }
ConsumeRequest message.
func (*ConsumeRequest) WriteToBuffer ¶
func (f *ConsumeRequest) WriteToBuffer(w *binary.WriteBuffer) error
WriteToBuffer implements theWritable interface.
type ConsumeResponse ¶
type ConsumeResponse struct { TopicHeader TopicHeader TopicPartitionBaseSeq map[string]uint64 // contains filtered or unexported fields }
ConsumeResponse struct.
func (*ConsumeResponse) Consume ¶
func (fr *ConsumeResponse) Consume(rb *binary.ReadBuffer, payloadSize uint32, msgLog chan<- Log) error
func (*ConsumeResponse) GetTopicsLatestSequenceNumber ¶
func (fr *ConsumeResponse) GetTopicsLatestSequenceNumber(rb *binary.ReadBuffer) (map[string]uint64, error)
type DiscoverPartitionsRequest ¶
type DiscoverPartitionsRequest struct{}
DiscoverPartitionsRequest struct.
type DiscoverPartitionsResponse ¶
type DiscoverPartitionsResponse struct{}
DiscoverPartitionsResponse struct.
func (*DiscoverPartitionsResponse) ReadFromBuffer ¶
func (bh *DiscoverPartitionsResponse) ReadFromBuffer(rb *binary.ReadBuffer, payloadSize uint32) error
ReadFromBuffer parses the first 5 bytes into basicHeader.
type FetchRequestTopic ¶
type FetchRequestTopic struct { Name string Partitions []FetchRequestTopicPartition }
FetchRequestTopic struct.
type FetchRequestTopicPartition ¶
type FetchRequestTopicPartition struct { PartitionID int16 ABSSequenceNumber uint64 FetchSize int32 }
FetchRequestTopicPartition struct.
type MessageError ¶
type MessageError struct {
// contains filtered or unexported fields
}
func NewMessageError ¶
func NewMessageError(inner error, msg string) *MessageError
NewMessage constructs a message error.
type Topic ¶
type Topic struct { Name string TotalPartitions uint8 Partition Partition LogBaseSeqNum uint64 MessageEnd uint64 }
func (*Topic) NextBundle ¶
func (t *Topic) NextBundle(rb *binary.ReadBuffer) bool
type TopicHeader ¶
Click to show internal directories.
Click to hide internal directories.