Documentation
¶
Index ¶
- Variables
- func NewDissector() api.Dissector
- func ReadResponse(r io.Reader, tcpID *api.TcpID, counterPair *api.CounterPair, ...) (err error)
- type AbortedTransactionsV4
- type ApiKey
- type ApiVersionsRequestV0
- type ApiVersionsRequestV3
- type ApiVersionsResponseApiKey
- type ApiVersionsResponseV0
- type ApiVersionsResponseV1
- type AssignmentsV0
- type Broker
- type BrokerV0
- type BrokerV1
- type Compression
- type CompressionCodec
- type CreateTopicsRequestConfigsV0
- type CreateTopicsRequestTopicV0
- type CreateTopicsRequestV0
- type CreateTopicsRequestV1
- type CreateTopicsResponseConfigsV5
- type CreateTopicsResponseTopicV0
- type CreateTopicsResponseTopicV1
- type CreateTopicsResponseTopicV5
- type CreateTopicsResponseTopicV7
- type CreateTopicsResponseV0
- type CreateTopicsResponseV1
- type CreateTopicsResponseV2
- type CreateTopicsResponseV5
- type CreateTopicsResponseV7
- type DeleteTopicsReponseResponseV0
- type DeleteTopicsReponseResponseV5
- type DeleteTopicsReponseResponseV6
- type DeleteTopicsReponseV0
- type DeleteTopicsReponseV1
- type DeleteTopicsReponseV5
- type DeleteTopicsReponseV6
- type DeleteTopicsRequestTopicV6
- type DeleteTopicsRequestV0
- type DeleteTopicsRequestV6
- type FetchPartitionV0
- type FetchPartitionV5
- type FetchPartitionV9
- type FetchRequestV0
- type FetchRequestV3
- type FetchRequestV4
- type FetchRequestV5
- type FetchRequestV7
- type FetchRequestV9
- type FetchRequestV11
- type FetchResponseV0
- type FetchResponseV1
- type FetchResponseV4
- type FetchResponseV5
- type FetchResponseV7
- type FetchResponseV11
- type FetchTopicV0
- type FetchTopicV5
- type FetchTopicV9
- type ForgottenTopicsDataV7
- type GroupMessage
- type KafkaPayload
- type KafkaPayloader
- type KafkaWrapper
- type ListOffsetsRequestPartitionV0
- type ListOffsetsRequestPartitionV1
- type ListOffsetsRequestPartitionV4
- type ListOffsetsRequestTopicV0
- type ListOffsetsRequestTopicV1
- type ListOffsetsRequestTopicV4
- type ListOffsetsRequestV0
- type ListOffsetsRequestV1
- type ListOffsetsRequestV2
- type ListOffsetsRequestV4
- type ListOffsetsResponsePartitionV0
- type ListOffsetsResponsePartitionV1
- type ListOffsetsResponsePartitionV4
- type ListOffsetsResponseTopicV0
- type ListOffsetsResponseTopicV1
- type ListOffsetsResponseTopicV4
- type ListOffsetsResponseV0
- type ListOffsetsResponseV1
- type ListOffsetsResponseV2
- type ListOffsetsResponseV4
- type Merger
- type Message
- type MessageBlock
- type MessageSet
- type MessageV0
- type MetadataRequestTopicV0
- type MetadataRequestTopicV10
- type MetadataRequestV0
- type MetadataRequestV4
- type MetadataRequestV8
- type MetadataRequestV10
- type MetadataRequestV11
- type MetadataResponseV0
- type MetadataResponseV1
- type MetadataResponseV2
- type MetadataResponseV3
- type MetadataResponseV5
- type MetadataResponseV7
- type MetadataResponseV8
- type MetadataResponseV10
- type MetadataResponseV11
- type Partition
- type PartitionData
- type PartitionResponseFetchV0
- type PartitionResponseFetchV4
- type PartitionResponseFetchV5
- type PartitionResponseFetchV11
- type PartitionResponseV0
- type PartitionResponseV2
- type PartitionResponseV5
- type PartitionResponseV8
- type Partitions
- type PartitionsV0
- type PartitionsV5
- type PartitionsV7
- type PreparedMessage
- type ProduceRequestV0
- type ProduceRequestV3
- type ProduceResponseV0
- type ProduceResponseV1
- type ProduceResponseV2
- type ProduceResponseV5
- type ProduceResponseV8
- type RecordBatch
- type RecordErrors
- type RecordHeader
- type RecordV0
- type Records
- type Request
- type RequestResponsePair
- type RequiredAcks
- type Response
- type ResponseFetchV0
- type ResponseFetchV4
- type ResponseFetchV5
- type ResponseFetchV11
- type ResponseV0
- type ResponseV2
- type ResponseV5
- type ResponseV8
- type Topic
- type TopicData
- type TopicV0
- type TopicV1
- type TopicV5
- type TopicV7
- type TopicV8
- type TopicV10
- type UUID
Constants ¶
This section is empty.
Variables ¶
var Dissector dissecting
Functions ¶
func NewDissector ¶
Types ¶
type AbortedTransactionsV4 ¶
type ApiKey ¶
type ApiKey int16
const ( Produce ApiKey = 0 Fetch ApiKey = 1 ListOffsets ApiKey = 2 Metadata ApiKey = 3 LeaderAndIsr ApiKey = 4 StopReplica ApiKey = 5 UpdateMetadata ApiKey = 6 ControlledShutdown ApiKey = 7 OffsetCommit ApiKey = 8 OffsetFetch ApiKey = 9 FindCoordinator ApiKey = 10 JoinGroup ApiKey = 11 Heartbeat ApiKey = 12 LeaveGroup ApiKey = 13 SyncGroup ApiKey = 14 DescribeGroups ApiKey = 15 ListGroups ApiKey = 16 SaslHandshake ApiKey = 17 ApiVersions ApiKey = 18 CreateTopics ApiKey = 19 DeleteTopics ApiKey = 20 DeleteRecords ApiKey = 21 InitProducerId ApiKey = 22 OffsetForLeaderEpoch ApiKey = 23 AddPartitionsToTxn ApiKey = 24 AddOffsetsToTxn ApiKey = 25 EndTxn ApiKey = 26 WriteTxnMarkers ApiKey = 27 TxnOffsetCommit ApiKey = 28 DescribeAcls ApiKey = 29 CreateAcls ApiKey = 30 DeleteAcls ApiKey = 31 DescribeConfigs ApiKey = 32 AlterConfigs ApiKey = 33 AlterReplicaLogDirs ApiKey = 34 DescribeLogDirs ApiKey = 35 SaslAuthenticate ApiKey = 36 CreatePartitions ApiKey = 37 CreateDelegationToken ApiKey = 38 RenewDelegationToken ApiKey = 39 ExpireDelegationToken ApiKey = 40 DescribeDelegationToken ApiKey = 41 DeleteGroups ApiKey = 42 ElectLeaders ApiKey = 43 IncrementalAlterConfigs ApiKey = 44 AlterPartitionReassignments ApiKey = 45 ListPartitionReassignments ApiKey = 46 OffsetDelete ApiKey = 47 DescribeClientQuotas ApiKey = 48 AlterClientQuotas ApiKey = 49 )
func ReadRequest ¶
type ApiVersionsRequestV0 ¶
type ApiVersionsRequestV0 struct{}
type ApiVersionsRequestV3 ¶
type ApiVersionsResponseV0 ¶
type ApiVersionsResponseV0 struct {
ErrorCode int16 `json:"errorCode"`
ApiKeys []ApiVersionsResponseApiKey `json:"apiKeys"`
}
type ApiVersionsResponseV1 ¶
type ApiVersionsResponseV1 struct {
ErrorCode int16 `json:"errorCode"`
ApiKeys []ApiVersionsResponseApiKey `json:"apiKeys"` // FIXME: `confluent-kafka-python` causes memory leak
ThrottleTimeMs int32 `json:"throttleTimeMs"`
}
type AssignmentsV0 ¶
type Compression ¶
type Compression = compress.Compression
type CompressionCodec ¶
type CreateTopicsRequestTopicV0 ¶
type CreateTopicsRequestTopicV0 struct {
Name string `json:"name"`
NumPartitions int32 `json:"numPartitions"`
ReplicationFactor int16 `json:"replicationFactor"`
Assignments []AssignmentsV0 `json:"assignments"`
Configs []CreateTopicsRequestConfigsV0 `json:"configs"`
}
type CreateTopicsRequestV0 ¶
type CreateTopicsRequestV0 struct {
Topics []CreateTopicsRequestTopicV0 `json:"topics"`
TimeoutMs int32 `json:"timeoutMs"`
}
type CreateTopicsRequestV1 ¶
type CreateTopicsRequestV1 struct {
Topics []CreateTopicsRequestTopicV0 `json:"topics"`
TimeoutMs int32 `json:"timeoutMs"`
ValidateOnly bool `json:"validateOnly"`
}
type CreateTopicsResponseTopicV7 ¶
type CreateTopicsResponseTopicV7 struct {
Name string `json:"name"`
TopicID UUID `json:"topicID"`
ErrorCode int16 `json:"errorCode"`
ErrorMessage string `json:"errorMessage"`
NumPartitions int32 `json:"numPartitions"`
ReplicationFactor int16 `json:"replicationFactor"`
Configs []CreateTopicsResponseConfigsV5 `json:"configs"`
}
type CreateTopicsResponseV0 ¶
type CreateTopicsResponseV0 struct {
Topics []CreateTopicsResponseTopicV0 `json:"topics"`
}
type CreateTopicsResponseV1 ¶
type CreateTopicsResponseV1 struct {
Topics []CreateTopicsResponseTopicV1 `json:"topics"`
}
type CreateTopicsResponseV2 ¶
type CreateTopicsResponseV2 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Topics []CreateTopicsResponseTopicV1 `json:"topics"`
}
type CreateTopicsResponseV5 ¶
type CreateTopicsResponseV5 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Topics []CreateTopicsResponseTopicV5 `json:"topics"`
}
type CreateTopicsResponseV7 ¶
type CreateTopicsResponseV7 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Topics []CreateTopicsResponseTopicV7 `json:"topics"`
}
type DeleteTopicsReponseV0 ¶
type DeleteTopicsReponseV0 struct {
Responses []DeleteTopicsReponseResponseV0 `json:"responses"`
}
type DeleteTopicsReponseV1 ¶
type DeleteTopicsReponseV1 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Responses []DeleteTopicsReponseResponseV0 `json:"responses"`
}
type DeleteTopicsReponseV5 ¶
type DeleteTopicsReponseV5 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Responses []DeleteTopicsReponseResponseV5 `json:"responses"`
}
type DeleteTopicsReponseV6 ¶
type DeleteTopicsReponseV6 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Responses []DeleteTopicsReponseResponseV6 `json:"responses"`
}
type DeleteTopicsRequestV0 ¶
type DeleteTopicsRequestV6 ¶
type DeleteTopicsRequestV6 struct {
Topics []DeleteTopicsRequestTopicV6 `json:"topics"`
TimeoutMs int32 `json:"timeoutMs"`
}
type FetchPartitionV0 ¶
type FetchPartitionV5 ¶
type FetchPartitionV9 ¶
type FetchRequestV0 ¶
type FetchRequestV0 struct {
ReplicaId int32 `json:"replicaId"`
MaxWaitMs int32 `json:"maxWaitMs"`
MinBytes int32 `json:"minBytes"`
Topics []FetchTopicV0 `json:"topics"`
}
type FetchRequestV3 ¶
type FetchRequestV3 struct {
ReplicaId int32 `json:"replicaId"`
MaxWaitMs int32 `json:"maxWaitMs"`
MinBytes int32 `json:"minBytes"`
MaxBytes int32 `json:"maxBytes"`
Topics []FetchTopicV0 `json:"topics"`
}
type FetchRequestV4 ¶
type FetchRequestV5 ¶
type FetchRequestV7 ¶
type FetchRequestV7 struct {
ReplicaId int32 `json:"replicaId"`
MaxWaitMs int32 `json:"maxWaitMs"`
MinBytes int32 `json:"minBytes"`
MaxBytes int32 `json:"maxBytes"`
IsolationLevel int8 `json:"isolationLevel"`
SessionId int32 `json:"sessionId"`
SessionEpoch int32 `json:"sessionEpoch"`
Topics []FetchTopicV5 `json:"topics"`
ForgottenTopicsData ForgottenTopicsDataV7 `json:"forgottenTopicsData"`
}
type FetchRequestV9 ¶
type FetchRequestV9 struct {
ReplicaId int32 `json:"replicaId"`
MaxWaitMs int32 `json:"maxWaitMs"`
MinBytes int32 `json:"minBytes"`
MaxBytes int32 `json:"maxBytes"`
IsolationLevel int8 `json:"isolationLevel"`
SessionId int32 `json:"sessionId"`
SessionEpoch int32 `json:"sessionEpoch"`
Topics []FetchTopicV9 `json:"topics"`
ForgottenTopicsData ForgottenTopicsDataV7 `json:"forgottenTopicsData"`
}
type FetchRequestV11 ¶
type FetchRequestV11 struct {
ReplicaId int32 `json:"replicaId"`
MaxWaitMs int32 `json:"maxWaitMs"`
MinBytes int32 `json:"minBytes"`
MaxBytes int32 `json:"maxBytes"`
IsolationLevel int8 `json:"isolationLevel"`
SessionId int32 `json:"sessionId"`
SessionEpoch int32 `json:"sessionEpoch"`
Topics []FetchTopicV9 `json:"topics"`
ForgottenTopicsData ForgottenTopicsDataV7 `json:"forgottenTopicsData"`
RackId string `json:"rackId"`
}
type FetchResponseV0 ¶
type FetchResponseV0 struct {
Responses []ResponseFetchV0 `json:"responses"`
}
type FetchResponseV1 ¶
type FetchResponseV1 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Responses []ResponseFetchV0 `json:"responses"`
}
type FetchResponseV4 ¶
type FetchResponseV4 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Responses []ResponseFetchV4 `json:"responses"`
}
type FetchResponseV5 ¶
type FetchResponseV5 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Responses []ResponseFetchV5 `json:"responses"`
}
type FetchResponseV7 ¶
type FetchResponseV7 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
ErrorCode int16 `json:"errorCode"`
SessionId int32 `json:"sessionId"`
Responses []ResponseFetchV5 `json:"responses"`
}
type FetchResponseV11 ¶
type FetchResponseV11 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
ErrorCode int16 `json:"errorCode"`
SessionId int32 `json:"sessionId"`
Responses []ResponseFetchV5 `json:"responses"`
}
type FetchTopicV0 ¶
type FetchTopicV0 struct {
Topic string `json:"topic"`
Partitions []FetchPartitionV0 `json:"partitions"`
}
type FetchTopicV5 ¶
type FetchTopicV5 struct {
Topic string `json:"topic"`
Partitions []FetchPartitionV5 `json:"partitions"`
}
type FetchTopicV9 ¶
type FetchTopicV9 struct {
Topic string `json:"topic"`
Partitions []FetchPartitionV9 `json:"partitions"`
}
type ForgottenTopicsDataV7 ¶
type GroupMessage ¶
type GroupMessage interface {
// Returns the group configured on the message.
Group() string
}
GroupMessage is an extension of the Message interface implemented by some request types to inform the program that they should be routed to a group coordinator.
type KafkaPayload ¶
type KafkaPayload struct {
Data interface{}
}
func (KafkaPayload) MarshalJSON ¶
func (h KafkaPayload) MarshalJSON() ([]byte, error)
type KafkaPayloader ¶
type KafkaWrapper ¶
type ListOffsetsRequestTopicV0 ¶
type ListOffsetsRequestTopicV0 struct {
Name string `json:"name"`
Partitions []ListOffsetsRequestPartitionV0 `json:"partitions"`
}
type ListOffsetsRequestTopicV1 ¶
type ListOffsetsRequestTopicV1 struct {
Name string `json:"name"`
Partitions []ListOffsetsRequestPartitionV1 `json:"partitions"`
}
type ListOffsetsRequestTopicV4 ¶
type ListOffsetsRequestTopicV4 struct {
Name string `json:"name"`
Partitions []ListOffsetsRequestPartitionV4 `json:"partitions"`
}
type ListOffsetsRequestV0 ¶
type ListOffsetsRequestV0 struct {
ReplicaId int32 `json:"replicaId"`
Topics []ListOffsetsRequestTopicV0 `json:"topics"`
}
type ListOffsetsRequestV1 ¶
type ListOffsetsRequestV1 struct {
ReplicaId int32 `json:"replicaId"`
Topics []ListOffsetsRequestTopicV1 `json:"topics"`
}
type ListOffsetsRequestV2 ¶
type ListOffsetsRequestV2 struct {
ReplicaId int32 `json:"replicaId"`
IsolationLevel int8 `json:"isolationLevel"`
Topics []ListOffsetsRequestTopicV1 `json:"topics"`
}
type ListOffsetsRequestV4 ¶
type ListOffsetsRequestV4 struct {
ReplicaId int32 `json:"replicaId"`
Topics []ListOffsetsRequestTopicV4 `json:"topics"`
}
type ListOffsetsResponseTopicV0 ¶
type ListOffsetsResponseTopicV0 struct {
Name string `json:"name"`
Partitions []ListOffsetsResponsePartitionV0 `json:"partitions"`
}
type ListOffsetsResponseTopicV1 ¶
type ListOffsetsResponseTopicV1 struct {
Name string `json:"name"`
Partitions []ListOffsetsResponsePartitionV1 `json:"partitions"`
}
type ListOffsetsResponseTopicV4 ¶
type ListOffsetsResponseTopicV4 struct {
Name string `json:"name"`
Partitions []ListOffsetsResponsePartitionV4 `json:"partitions"`
}
type ListOffsetsResponseV0 ¶
type ListOffsetsResponseV0 struct {
Topics []ListOffsetsResponseTopicV0 `json:"topics"`
}
type ListOffsetsResponseV1 ¶
type ListOffsetsResponseV1 struct {
Topics []ListOffsetsResponseTopicV1 `json:"topics"`
}
type ListOffsetsResponseV2 ¶
type ListOffsetsResponseV2 struct {
ThrottleTimeMs int32 `json:"throttleTimeMs"`
Topics []ListOffsetsResponseTopicV1 `json:"topics"`
}
type ListOffsetsResponseV4 ¶
type ListOffsetsResponseV4 struct {
Topics []ListOffsetsResponseTopicV4 `json:"topics"`
}
type Merger ¶
type Merger interface {
// Given a list of message and associated results, merge them back into a
// response (or an error). The results must be either Message or error
// values, other types should trigger a panic.
Merge(messages []Message, results []interface{}) (Message, error)
}
Merger is an interface implemented by messages which can merge multiple results into one response.
type Message ¶
type Message interface {
ApiKey() ApiKey
}
Message is an interface implemented by all request and response types of the kafka protocol.
This interface is used mostly as a safe-guard to provide a compile-time check for values passed to functions dealing kafka message types.
type MessageBlock ¶
MessageBlock represents a part of request with message
type MessageSet ¶
type MessageSet struct {
PartialTrailingMessage bool `json:"partialTrailingMessage"` // whether the set on the wire contained an incomplete trailing MessageBlock
OverflowMessage bool `json:"overflowMessage"` // whether the set on the wire contained an overflow message
Messages []*MessageBlock `json:"messages"`
}
MessageSet is a replacement for RecordBatch in older versions
type MessageV0 ¶
type MessageV0 struct {
Codec int8 `json:"codec"` // codec used to compress the message contents
CompressionLevel int `json:"compressionLevel"` // compression level
LogAppendTime bool `json:"logAppendTime"` // the used timestamp is LogAppendTime
Key []byte `json:"key"` // the message key, may be nil
Value []byte `json:"value"` // the message contents
Set *MessageSet `json:"set"` // the message set a message might wrap
Version int8 `json:"version"` // v1 requires Kafka 0.10
Timestamp time.Time `json:"timestamp"` // the timestamp of the message (version 1+ only)
}
Message is a kafka message type
type MetadataRequestTopicV0 ¶
type MetadataRequestTopicV0 struct {
Name string `json:"name"`
}
type MetadataRequestTopicV10 ¶
type MetadataRequestV0 ¶
type MetadataRequestV0 struct {
Topics []MetadataRequestTopicV0 `json:"topics"`
}
type MetadataRequestV4 ¶
type MetadataRequestV4 struct {
Topics []MetadataRequestTopicV0 `json:"topics"`
AllowAutoTopicCreation bool `json:"allowAutoTopicCreation"`
}
type MetadataRequestV8 ¶
type MetadataRequestV8 struct {
Topics []MetadataRequestTopicV0 `json:"topics"`
AllowAutoTopicCreation bool `json:"allowAutoTopicCreation"`
IncludeClusterAuthorizedOperations bool `json:"includeClusterAuthorizedOperations"`
IncludeTopicAuthorizedOperations bool `json:"includeTopicAuthorizedOperations"`
}
type MetadataRequestV10 ¶
type MetadataRequestV10 struct {
Topics []MetadataRequestTopicV10 `json:"topics"`
AllowAutoTopicCreation bool `json:"allowAutoTopicCreation"`
IncludeClusterAuthorizedOperations bool `json:"includeClusterAuthorizedOperations"`
IncludeTopicAuthorizedOperations bool `json:"includeTopicAuthorizedOperations"`
}
type MetadataRequestV11 ¶
type MetadataRequestV11 struct {
Topics []MetadataRequestTopicV10 `json:"topics"`
AllowAutoTopicCreation bool `json:"allowAutoTopicCreation"`
IncludeTopicAuthorizedOperations bool `json:"includeTopicAuthorizedOperations"`
}
type MetadataResponseV0 ¶
type MetadataResponseV1 ¶
type MetadataResponseV2 ¶
type MetadataResponseV3 ¶
type MetadataResponseV5 ¶
type MetadataResponseV7 ¶
type MetadataResponseV8 ¶
type MetadataResponseV10 ¶
type MetadataResponseV11 ¶
type PartitionData ¶
type PartitionResponseFetchV4 ¶
type PartitionResponseFetchV4 struct {
Partition int32 `json:"partition"`
ErrorCode int16 `json:"errorCode"`
HighWatermark int64 `json:"highWatermark"`
LastStableOffset int64 `json:"lastStableOffset"`
AbortedTransactions AbortedTransactionsV4 `json:"abortedTransactions"`
RecordSet Records `json:"recordSet"`
}
type PartitionResponseFetchV5 ¶
type PartitionResponseFetchV5 struct {
Partition int32 `json:"partition"`
ErrorCode int16 `json:"errorCode"`
HighWatermark int64 `json:"highWatermark"`
LastStableOffset int64 `json:"lastStableOffset"`
LogStartOffset int64 `json:"logStartOffset"`
AbortedTransactions AbortedTransactionsV4 `json:"abortedTransactions"`
RecordSet Records `json:"recordSet"`
}
type PartitionResponseFetchV11 ¶
type PartitionResponseFetchV11 struct {
Partition int32 `json:"partition"`
ErrorCode int16 `json:"errorCode"`
HighWatermark int64 `json:"highWatermark"`
LastStableOffset int64 `json:"lastStableOffset"`
LogStartOffset int64 `json:"logStartOffset"`
AbortedTransactions AbortedTransactionsV4 `json:"abortedTransactions"`
PreferredReadReplica int32 `json:"preferredReadReplica"`
RecordSet Records `json:"recordSet"`
}
type PartitionResponseV0 ¶
type PartitionResponseV2 ¶
type PartitionResponseV5 ¶
type PartitionResponseV8 ¶
type PartitionResponseV8 struct {
Index int32 `json:"index"`
ErrorCode int16 `json:"errorCode"`
BaseOffset int64 `json:"baseOffset"`
LogAppendTimeMs int64 `json:"logAppendTimeMs"`
LogStartOffset int64 `json:"logStartOffset"`
RecordErrors RecordErrors `json:"recordErrors"`
ErrorMessage string `json:"errorMessage"`
}
type Partitions ¶
type Partitions struct {
Length int32 `json:"length"`
PartitionData PartitionData `json:"partitionData"`
}
type PartitionsV0 ¶
type PartitionsV5 ¶
type PartitionsV7 ¶
type PartitionsV7 struct {
ErrorCode int16 `json:"errorCode"`
PartitionIndex int32 `json:"partitionIndex"`
LeaderId int32 `json:"leaderId"`
LeaderEpoch int32 `json:"leaderEpoch"`
ReplicaNodes int32 `json:"replicaNodes"`
IsrNodes int32 `json:"isrNodes"`
OfflineReplicas int32 `json:"offlineReplicas"`
}
type PreparedMessage ¶
type PreparedMessage interface {
// Prepares the message before being sent to a kafka broker using the API
// version passed as argument.
Prepare(apiVersion int16)
}
PreparedMessage is an extension of the Message interface implemented by some request types which may need to run some pre-processing on their state before being sent.
type ProduceRequestV0 ¶
type ProduceRequestV0 struct {
RequiredAcks RequiredAcks `json:"requiredAcks"`
Timeout int32 `json:"timeout"`
TopicData []TopicData `json:"topicData"`
}
type ProduceRequestV3 ¶
type ProduceRequestV3 struct {
TransactionalID string `json:"transactionalID"`
RequiredAcks RequiredAcks `json:"requiredAcks"`
Timeout int32 `json:"timeout"`
TopicData []TopicData `json:"topicData"`
}
type ProduceResponseV0 ¶
type ProduceResponseV0 struct {
Responses []ResponseV0 `json:"responses"`
}
type ProduceResponseV1 ¶
type ProduceResponseV1 struct {
Responses []ResponseV0 `json:"responses"`
ThrottleTimeMs int32 `json:"throttleTimeMs"`
}
type ProduceResponseV2 ¶
type ProduceResponseV2 struct {
Responses []ResponseV2 `json:"responses"`
ThrottleTimeMs int32 `json:"throttleTimeMs"`
}
type ProduceResponseV5 ¶
type ProduceResponseV5 struct {
Responses []ResponseV5 `json:"responses"`
ThrottleTimeMs int32 `json:"throttleTimeMs"`
}
type ProduceResponseV8 ¶
type ProduceResponseV8 struct {
Responses []ResponseV8 `json:"responses"`
ThrottleTimeMs int32 `json:"throttleTimeMs"`
}
type RecordBatch ¶
type RecordBatch struct {
BaseOffset int64 `json:"baseOffset"`
BatchLength int32 `json:"batchLength"`
PartitionLeaderEpoch int32 `json:"partitionLeaderEpoch"`
Magic int8 `json:"magic"`
Crc int32 `json:"crc"`
Attributes int16 `json:"attributes"`
LastOffsetDelta int32 `json:"lastOffsetDelta"`
FirstTimestamp int64 `json:"firstTimestamp"`
MaxTimestamp int64 `json:"maxTimestamp"`
ProducerId int64 `json:"producerId"`
ProducerEpoch int16 `json:"producerEpoch"`
BaseSequence int32 `json:"baseSequence"`
Record []RecordV0 `json:"record"`
}
RecordBatch are records from one kafka request
type RecordErrors ¶
type RecordHeader ¶
type RecordV0 ¶
type RecordV0 struct {
Unknown int8 `json:"unknown"`
Attributes int8 `json:"attributes"`
TimestampDelta int8 `json:"timestampDelta"`
OffsetDelta int8 `json:"offsetDelta"`
KeyLength int8 `json:"keyLength"`
Key string `json:"key"`
ValueLen int8 `json:"valueLen"`
Value string `json:"value"`
Headers []RecordHeader `json:"headers"`
}
Record is kafka record type
type Records ¶
type Records struct {
RecordBatch RecordBatch `json:"recordBatch"`
}
type Request ¶
type Request struct {
Size int32 `json:"size"`
ApiKeyName string `json:"apiKeyName"`
ApiKey ApiKey `json:"apiKey"`
ApiVersion int16 `json:"apiVersion"`
CorrelationID int32 `json:"correlationID"`
ClientID string `json:"clientID"`
Payload interface{} `json:"payload"`
CaptureTime time.Time `json:"captureTime"`
}
type RequestResponsePair ¶
type RequiredAcks ¶
type RequiredAcks int16
const ( RequireNone RequiredAcks = 0 RequireOne RequiredAcks = 1 RequireAll RequiredAcks = -1 )
type ResponseFetchV0 ¶
type ResponseFetchV0 struct {
Topic string `json:"topic"`
PartitionResponses []PartitionResponseFetchV0 `json:"partitionResponses"`
}
type ResponseFetchV4 ¶
type ResponseFetchV4 struct {
Topic string `json:"topic"`
PartitionResponses []PartitionResponseFetchV4 `json:"partitionResponses"`
}
type ResponseFetchV5 ¶
type ResponseFetchV5 struct {
Topic string `json:"topic"`
PartitionResponses []PartitionResponseFetchV5 `json:"partitionResponses"`
}
type ResponseFetchV11 ¶
type ResponseFetchV11 struct {
Topic string `json:"topic"`
PartitionResponses []PartitionResponseFetchV11 `json:"partitionResponses"`
}
type ResponseV0 ¶
type ResponseV0 struct {
Name string `json:"name"`
PartitionResponses []PartitionResponseV0 `json:"partitionResponses"`
}
type ResponseV2 ¶
type ResponseV2 struct {
Name string `json:"name"`
PartitionResponses []PartitionResponseV2 `json:"partitionResponses"`
}
type ResponseV5 ¶
type ResponseV5 struct {
Name string `json:"name"`
PartitionResponses []PartitionResponseV5 `json:"partitionResponses"`
}
type ResponseV8 ¶
type ResponseV8 struct {
Name string `json:"name"`
PartitionResponses []PartitionResponseV8 `json:"partitionResponses"`
}
type TopicData ¶
type TopicData struct {
Topic string `json:"topic"`
Partitions Partitions `json:"partitions"`
}
type TopicV0 ¶
type TopicV0 struct {
ErrorCode int16 `json:"errorCode"`
Name string `json:"name"`
Partitions []PartitionsV0 `json:"partitions"`
}
type TopicV1 ¶
type TopicV1 struct {
ErrorCode int16 `json:"errorCode"`
Name string `json:"name"`
IsInternal bool `json:"isInternal"`
Partitions []PartitionsV0 `json:"partitions"`
}
type TopicV5 ¶
type TopicV5 struct {
ErrorCode int16 `json:"errorCode"`
Name string `json:"name"`
IsInternal bool `json:"isInternal"`
Partitions []PartitionsV5 `json:"partitions"`
}
type TopicV7 ¶
type TopicV7 struct {
ErrorCode int16 `json:"errorCode"`
Name string `json:"name"`
IsInternal bool `json:"isInternal"`
Partitions []PartitionsV7 `json:"partitions"`
}
type TopicV8 ¶
type TopicV8 struct {
ErrorCode int16 `json:"errorCode"`
Name string `json:"name"`
IsInternal bool `json:"isInternal"`
Partitions []PartitionsV7 `json:"partitions"`
TopicAuthorizedOperations int32 `json:"topicAuthorizedOperations"`
}