kafkaapi

package
v0.0.0-...-478004b Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbortedTransaction

type AbortedTransaction struct {
	ProducerID  value.Int64
	FirstOffset value.Int64
}

type ApiKeyEntry

type ApiKeyEntry struct {
	// ApiKey contains the API index.
	ApiKey value.Int16
	// MinVersion contains the minimum supported version, inclusive.
	MinVersion value.Int16
	// MaxVersion contains the maximum supported version, inclusive.
	MaxVersion value.Int16
}

ApiKeyEntry contains the APIs supported by the broker.

type ApiVersionsRequest

type ApiVersionsRequest struct {
	Header headers.RequestHeader
	Body   ApiVersionsRequestBody
}

func (ApiVersionsRequest) GetHeader

GetHeader implements the RequestI interface

type ApiVersionsRequestBody

type ApiVersionsRequestBody struct {
	// Version defines the protocol version to use for encode and decode
	Version value.Int16
	// ClientSoftwareName contains the name of the client.
	ClientSoftwareName value.CompactString
	// ClientSoftwareVersion contains the version of the client.
	ClientSoftwareVersion value.CompactString
}

type ApiVersionsResponse

type ApiVersionsResponse struct {
	Header headers.ResponseHeader
	Body   ApiVersionsResponseBody
}

type ApiVersionsResponseBody

type ApiVersionsResponseBody struct {
	// Version defines the protocol version to use for encode and decode
	Version int16
	// ErrorCode contains the top-level error code.
	ErrorCode value.Int16
	// ApiKeys contains the APIs supported by the broker.
	ApiKeys []ApiKeyEntry
	// ThrottleTimeMs contains the duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota.
	ThrottleTimeMs value.Int32
}

type ClusterMetadataPayload

type ClusterMetadataPayload struct {
	FrameVersion int8
	Type         int8
	Version      int8
	Data         ClusterMetadataPayloadDataRecord
}

func (ClusterMetadataPayload) Encode

func (p ClusterMetadataPayload) Encode(encoder *encoder.Encoder)

type ClusterMetadataPayloadDataRecord

type ClusterMetadataPayloadDataRecord interface {
	GetEncodedBytes() []byte
	// contains filtered or unexported methods
}

type Cursor

type Cursor struct {
	TopicName      value.CompactString
	PartitionIndex value.Int32
}

type DescribeTopicPartitionsRequest

type DescribeTopicPartitionsRequest struct {
	Header headers.RequestHeader
	Body   DescribeTopicPartitionsRequestBody
}

func (DescribeTopicPartitionsRequest) GetHeader

GetHeader implements the RequestI interface

type DescribeTopicPartitionsRequestBody

type DescribeTopicPartitionsRequestBody struct {
	TopicNames             []value.CompactString
	ResponsePartitionLimit value.Int32
	// This is unused because we don't test using cursors in this extension
	Cursor *Cursor
}

type DescribeTopicPartitionsResponse

type DescribeTopicPartitionsResponse struct {
	Header headers.ResponseHeader
	Body   DescribeTopicPartitionsResponseBody
}

type DescribeTopicPartitionsResponseBody

type DescribeTopicPartitionsResponseBody struct {
	ThrottleTimeMs value.Int32
	Topics         []DescribeTopicPartitionsResponseTopic
	NextCursor     DescribeTopicPartitionsResponseCursor
}

type DescribeTopicPartitionsResponseCursor

type DescribeTopicPartitionsResponseCursor struct {
	TopicName      value.CompactString
	PartitionIndex value.Int32
}

type DescribeTopicPartitionsResponsePartition

type DescribeTopicPartitionsResponsePartition struct {
	ErrorCode              value.Int16
	PartitionIndex         value.Int32
	LeaderId               value.Int32
	LeaderEpoch            value.Int32
	ReplicaNodes           []value.Int32
	IsrNodes               []value.Int32
	EligibleLeaderReplicas []value.Int32
	LastKnownElr           []value.Int32
	OfflineReplicas        []value.Int32
}

type DescribeTopicPartitionsResponseTopic

type DescribeTopicPartitionsResponseTopic struct {
	ErrorCode                 value.Int16
	Name                      value.CompactNullableString
	TopicUUID                 value.UUID
	IsInternal                value.Boolean
	Partitions                []DescribeTopicPartitionsResponsePartition
	TopicAuthorizedOperations value.Int32
}

type FeatureLevelRecord

type FeatureLevelRecord struct {
	Name         string
	FeatureLevel int16
}

func (*FeatureLevelRecord) GetEncodedBytes

func (f *FeatureLevelRecord) GetEncodedBytes() []byte

type FetchRequest

type FetchRequest struct {
	Header headers.RequestHeader
	Body   FetchRequestBody
}

func (FetchRequest) GetHeader

func (r FetchRequest) GetHeader() headers.RequestHeader

GetHeader implements the RequestI interface

type FetchRequestBody

type FetchRequestBody struct {
	MaxWaitMS       value.Int32
	MinBytes        value.Int32
	MaxBytes        value.Int32
	IsolationLevel  value.Int8
	SessionId       value.Int32
	SessionEpoch    value.Int32
	Topics          []Topic
	ForgottenTopics []ForgottenTopic
	RackId          value.CompactString
}

type FetchResponse

type FetchResponse struct {
	Header headers.ResponseHeader
	Body   FetchResponseBody
}

type FetchResponseBody

type FetchResponseBody struct {
	ThrottleTimeMs value.Int32
	ErrorCode      value.Int16
	SessionId      value.Int32
	TopicResponses []TopicResponse
}

type ForgottenTopic

type ForgottenTopic struct {
	UUID         value.UUID
	PartitionIds []value.Int32
}

type Partition

type Partition struct {
	ID                 value.Int32 // partition id
	CurrentLeaderEpoch value.Int32 // current leader epoch
	FetchOffset        value.Int64 // fetch offset
	LastFetchedOffset  value.Int32 // last fetched offset
	LogStartOffset     value.Int64 // log start offset
	PartitionMaxBytes  value.Int32 // max bytes to fetch
}

type PartitionRecord

type PartitionRecord struct {
	PartitionId      int32
	TopicUUID        string
	Replicas         []int32
	ISReplicas       []int32
	RemovingReplicas []int32
	AddingReplicas   []int32
	Leader           int32
	LeaderEpoch      int32
	PartitionEpoch   int32
	DirectoryUUIDs   []string
}

func (*PartitionRecord) GetEncodedBytes

func (p *PartitionRecord) GetEncodedBytes() []byte

type PartitionResponse

type PartitionResponse struct {
	Id                   value.Int32
	ErrorCode            value.Int16
	HighWatermark        value.Int64
	LastStableOffset     value.Int64
	LogStartOffset       value.Int64
	AbortedTransactions  []AbortedTransaction
	RecordBatches        []RecordBatch
	PreferredReadReplica value.Int32
}

type Record

type Record struct {
	Length         value.Int32
	Attributes     value.Int8
	TimestampDelta value.Varint
	OffsetDelta    value.Varint
	Key            []byte
	Value          []byte
	Headers        []RecordHeader
}

func (Record) Encode

func (r Record) Encode(pe *encoder.Encoder)

type RecordBatch

type RecordBatch struct {
	BaseOffset           value.Int64
	BatchLength          value.Int32
	PartitionLeaderEpoch value.Int32
	Magic                value.Int8
	CRC                  value.Int32
	Attributes           value.Int16
	LastOffsetDelta      value.Int32
	FirstTimestamp       value.Int64
	MaxTimestamp         value.Int64
	ProducerId           value.Int64
	ProducerEpoch        value.Int16
	BaseSequence         value.Int32
	Records              []Record
}

func (*RecordBatch) Encode

func (rb *RecordBatch) Encode(pe *encoder.Encoder)

func (*RecordBatch) IsCRCValueOk

func (rb *RecordBatch) IsCRCValueOk() bool

func (*RecordBatch) SetCRC

func (rb *RecordBatch) SetCRC()

type RecordBatches

type RecordBatches []RecordBatch

func (RecordBatches) Encode

func (rbs RecordBatches) Encode(pe *encoder.Encoder)

type RecordHeader

type RecordHeader struct {
	Key   value.RawBytes
	Value value.RawBytes
}

func (RecordHeader) Encode

func (rh RecordHeader) Encode(pe *encoder.Encoder)

type Topic

type Topic struct {
	UUID       value.UUID
	Partitions []Partition
}

type TopicRecord

type TopicRecord struct {
	TopicName string
	TopicUUID string
}

func (*TopicRecord) GetEncodedBytes

func (t *TopicRecord) GetEncodedBytes() []byte

type TopicResponse

type TopicResponse struct {
	UUID               value.UUID
	PartitionResponses []PartitionResponse
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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