Documentation ¶
Overview ¶
Package kmsg contains Kafka request and response types and autogenerated serialization and deserialization functions.
This package reserves the right to add new fields to struct types as Kafka adds new fields over time without bumping the major version. New requests will also be added without bumping the major version. The major version will also NOT BE BUMPED if a field's type is changed. The major version of this package is only bumped if it is required to be bumped per the kgo package.
Kafka has only once in its history changed a non-array field's type, changing a string to a pointer to a string. These types of changes are expected to be very uncommon, and this package is provided with the understanding that it is advanced and may require some very minor maintenance if a field's type changes.
If you are using this package directly with kgo, you should either ALWAYS use New functions (or Default functions after creating structs, you should pin the max supported version. If you use New functions, you should have safe defaults as new fields are added. If you pin versions, you will avoid new fields being used. If you do neither of these, you may opt in to new fields that do not have safe zero value defaults, and this may lead to errors or unexpected results.
All "Default" functions set non-Go-default field defaults. They do not set any fields whose default value is a Go default. Thus, Default functions will set -1, but not 0 nor nil. All "New" functions also set non-Go-default fields. Requests and Responses also have a "NewPtr" function that is the same as "New," but returns a pointer to the type.
Most of this package is generated, but a few things are manual. What is manual: all interfaces, the RequestFormatter, record / message / record batch reading, and sticky member metadata serialization.
Index ¶
- Constants
- func NameForKey(key int16) string
- func SkipTags(b *kbin.Reader)
- func StringPtr(in string) *string
- type ACLOperation
- type ACLPermissionType
- type ACLResourcePatternType
- type ACLResourceType
- type AddOffsetsToTxnRequest
- func (v *AddOffsetsToTxnRequest) AppendTo(dst []byte) []byte
- func (v *AddOffsetsToTxnRequest) Default()
- func (v *AddOffsetsToTxnRequest) GetVersion() int16
- func (v *AddOffsetsToTxnRequest) IsFlexible() bool
- func (v *AddOffsetsToTxnRequest) IsTxnCoordinatorRequest()
- func (*AddOffsetsToTxnRequest) Key() int16
- func (*AddOffsetsToTxnRequest) MaxVersion() int16
- func (v *AddOffsetsToTxnRequest) ReadFrom(src []byte) error
- func (v *AddOffsetsToTxnRequest) RequestWith(ctx context.Context, r Requestor) (*AddOffsetsToTxnResponse, error)
- func (v *AddOffsetsToTxnRequest) ResponseKind() Response
- func (v *AddOffsetsToTxnRequest) SetVersion(version int16)
- type AddOffsetsToTxnResponse
- func (v *AddOffsetsToTxnResponse) AppendTo(dst []byte) []byte
- func (v *AddOffsetsToTxnResponse) Default()
- func (v *AddOffsetsToTxnResponse) GetVersion() int16
- func (v *AddOffsetsToTxnResponse) IsFlexible() bool
- func (*AddOffsetsToTxnResponse) Key() int16
- func (*AddOffsetsToTxnResponse) MaxVersion() int16
- func (v *AddOffsetsToTxnResponse) ReadFrom(src []byte) error
- func (v *AddOffsetsToTxnResponse) RequestKind() Request
- func (v *AddOffsetsToTxnResponse) SetVersion(version int16)
- func (v *AddOffsetsToTxnResponse) Throttle() (int32, bool)
- type AddPartitionsToTxnRequest
- func (v *AddPartitionsToTxnRequest) AppendTo(dst []byte) []byte
- func (v *AddPartitionsToTxnRequest) Default()
- func (v *AddPartitionsToTxnRequest) GetVersion() int16
- func (v *AddPartitionsToTxnRequest) IsFlexible() bool
- func (v *AddPartitionsToTxnRequest) IsTxnCoordinatorRequest()
- func (*AddPartitionsToTxnRequest) Key() int16
- func (*AddPartitionsToTxnRequest) MaxVersion() int16
- func (v *AddPartitionsToTxnRequest) ReadFrom(src []byte) error
- func (v *AddPartitionsToTxnRequest) RequestWith(ctx context.Context, r Requestor) (*AddPartitionsToTxnResponse, error)
- func (v *AddPartitionsToTxnRequest) ResponseKind() Response
- func (v *AddPartitionsToTxnRequest) SetVersion(version int16)
- type AddPartitionsToTxnRequestTopic
- type AddPartitionsToTxnResponse
- func (v *AddPartitionsToTxnResponse) AppendTo(dst []byte) []byte
- func (v *AddPartitionsToTxnResponse) Default()
- func (v *AddPartitionsToTxnResponse) GetVersion() int16
- func (v *AddPartitionsToTxnResponse) IsFlexible() bool
- func (*AddPartitionsToTxnResponse) Key() int16
- func (*AddPartitionsToTxnResponse) MaxVersion() int16
- func (v *AddPartitionsToTxnResponse) ReadFrom(src []byte) error
- func (v *AddPartitionsToTxnResponse) RequestKind() Request
- func (v *AddPartitionsToTxnResponse) SetVersion(version int16)
- func (v *AddPartitionsToTxnResponse) Throttle() (int32, bool)
- type AddPartitionsToTxnResponseTopic
- type AddPartitionsToTxnResponseTopicPartition
- type AdminRequest
- type AlterClientQuotasRequest
- func (v *AlterClientQuotasRequest) AppendTo(dst []byte) []byte
- func (v *AlterClientQuotasRequest) Default()
- func (v *AlterClientQuotasRequest) GetVersion() int16
- func (v *AlterClientQuotasRequest) IsFlexible() bool
- func (*AlterClientQuotasRequest) Key() int16
- func (*AlterClientQuotasRequest) MaxVersion() int16
- func (v *AlterClientQuotasRequest) ReadFrom(src []byte) error
- func (v *AlterClientQuotasRequest) RequestWith(ctx context.Context, r Requestor) (*AlterClientQuotasResponse, error)
- func (v *AlterClientQuotasRequest) ResponseKind() Response
- func (v *AlterClientQuotasRequest) SetVersion(version int16)
- type AlterClientQuotasRequestEntry
- type AlterClientQuotasRequestEntryEntity
- type AlterClientQuotasRequestEntryOp
- type AlterClientQuotasResponse
- func (v *AlterClientQuotasResponse) AppendTo(dst []byte) []byte
- func (v *AlterClientQuotasResponse) Default()
- func (v *AlterClientQuotasResponse) GetVersion() int16
- func (v *AlterClientQuotasResponse) IsFlexible() bool
- func (*AlterClientQuotasResponse) Key() int16
- func (*AlterClientQuotasResponse) MaxVersion() int16
- func (v *AlterClientQuotasResponse) ReadFrom(src []byte) error
- func (v *AlterClientQuotasResponse) RequestKind() Request
- func (v *AlterClientQuotasResponse) SetVersion(version int16)
- func (v *AlterClientQuotasResponse) Throttle() (int32, bool)
- type AlterClientQuotasResponseEntry
- type AlterClientQuotasResponseEntryEntity
- type AlterConfigsRequest
- func (v *AlterConfigsRequest) AppendTo(dst []byte) []byte
- func (v *AlterConfigsRequest) Default()
- func (v *AlterConfigsRequest) GetVersion() int16
- func (v *AlterConfigsRequest) IsFlexible() bool
- func (*AlterConfigsRequest) Key() int16
- func (*AlterConfigsRequest) MaxVersion() int16
- func (v *AlterConfigsRequest) ReadFrom(src []byte) error
- func (v *AlterConfigsRequest) RequestWith(ctx context.Context, r Requestor) (*AlterConfigsResponse, error)
- func (v *AlterConfigsRequest) ResponseKind() Response
- func (v *AlterConfigsRequest) SetVersion(version int16)
- type AlterConfigsRequestResource
- type AlterConfigsRequestResourceConfig
- type AlterConfigsResponse
- func (v *AlterConfigsResponse) AppendTo(dst []byte) []byte
- func (v *AlterConfigsResponse) Default()
- func (v *AlterConfigsResponse) GetVersion() int16
- func (v *AlterConfigsResponse) IsFlexible() bool
- func (*AlterConfigsResponse) Key() int16
- func (*AlterConfigsResponse) MaxVersion() int16
- func (v *AlterConfigsResponse) ReadFrom(src []byte) error
- func (v *AlterConfigsResponse) RequestKind() Request
- func (v *AlterConfigsResponse) SetVersion(version int16)
- func (v *AlterConfigsResponse) Throttle() (int32, bool)
- type AlterConfigsResponseResource
- type AlterISRRequest
- func (v *AlterISRRequest) AppendTo(dst []byte) []byte
- func (v *AlterISRRequest) Default()
- func (v *AlterISRRequest) GetVersion() int16
- func (v *AlterISRRequest) IsAdminRequest()
- func (v *AlterISRRequest) IsFlexible() bool
- func (*AlterISRRequest) Key() int16
- func (*AlterISRRequest) MaxVersion() int16
- func (v *AlterISRRequest) ReadFrom(src []byte) error
- func (v *AlterISRRequest) RequestWith(ctx context.Context, r Requestor) (*AlterISRResponse, error)
- func (v *AlterISRRequest) ResponseKind() Response
- func (v *AlterISRRequest) SetVersion(version int16)
- type AlterISRRequestTopic
- type AlterISRRequestTopicPartition
- type AlterISRResponse
- func (v *AlterISRResponse) AppendTo(dst []byte) []byte
- func (v *AlterISRResponse) Default()
- func (v *AlterISRResponse) GetVersion() int16
- func (v *AlterISRResponse) IsFlexible() bool
- func (*AlterISRResponse) Key() int16
- func (*AlterISRResponse) MaxVersion() int16
- func (v *AlterISRResponse) ReadFrom(src []byte) error
- func (v *AlterISRResponse) RequestKind() Request
- func (v *AlterISRResponse) SetVersion(version int16)
- func (v *AlterISRResponse) Throttle() (int32, bool)
- type AlterISRResponseTopic
- type AlterISRResponseTopicPartition
- type AlterPartitionAssignmentsRequest
- func (v *AlterPartitionAssignmentsRequest) AppendTo(dst []byte) []byte
- func (v *AlterPartitionAssignmentsRequest) Default()
- func (v *AlterPartitionAssignmentsRequest) GetVersion() int16
- func (v *AlterPartitionAssignmentsRequest) IsAdminRequest()
- func (v *AlterPartitionAssignmentsRequest) IsFlexible() bool
- func (*AlterPartitionAssignmentsRequest) Key() int16
- func (*AlterPartitionAssignmentsRequest) MaxVersion() int16
- func (v *AlterPartitionAssignmentsRequest) ReadFrom(src []byte) error
- func (v *AlterPartitionAssignmentsRequest) RequestWith(ctx context.Context, r Requestor) (*AlterPartitionAssignmentsResponse, error)
- func (v *AlterPartitionAssignmentsRequest) ResponseKind() Response
- func (v *AlterPartitionAssignmentsRequest) SetVersion(version int16)
- type AlterPartitionAssignmentsRequestTopic
- type AlterPartitionAssignmentsRequestTopicPartition
- type AlterPartitionAssignmentsResponse
- func (v *AlterPartitionAssignmentsResponse) AppendTo(dst []byte) []byte
- func (v *AlterPartitionAssignmentsResponse) Default()
- func (v *AlterPartitionAssignmentsResponse) GetVersion() int16
- func (v *AlterPartitionAssignmentsResponse) IsFlexible() bool
- func (*AlterPartitionAssignmentsResponse) Key() int16
- func (*AlterPartitionAssignmentsResponse) MaxVersion() int16
- func (v *AlterPartitionAssignmentsResponse) ReadFrom(src []byte) error
- func (v *AlterPartitionAssignmentsResponse) RequestKind() Request
- func (v *AlterPartitionAssignmentsResponse) SetVersion(version int16)
- func (v *AlterPartitionAssignmentsResponse) Throttle() (int32, bool)
- type AlterPartitionAssignmentsResponseTopic
- type AlterPartitionAssignmentsResponseTopicPartition
- type AlterReplicaLogDirsRequest
- func (v *AlterReplicaLogDirsRequest) AppendTo(dst []byte) []byte
- func (v *AlterReplicaLogDirsRequest) Default()
- func (v *AlterReplicaLogDirsRequest) GetVersion() int16
- func (v *AlterReplicaLogDirsRequest) IsFlexible() bool
- func (*AlterReplicaLogDirsRequest) Key() int16
- func (*AlterReplicaLogDirsRequest) MaxVersion() int16
- func (v *AlterReplicaLogDirsRequest) ReadFrom(src []byte) error
- func (v *AlterReplicaLogDirsRequest) RequestWith(ctx context.Context, r Requestor) (*AlterReplicaLogDirsResponse, error)
- func (v *AlterReplicaLogDirsRequest) ResponseKind() Response
- func (v *AlterReplicaLogDirsRequest) SetVersion(version int16)
- type AlterReplicaLogDirsRequestDir
- type AlterReplicaLogDirsRequestDirTopic
- type AlterReplicaLogDirsResponse
- func (v *AlterReplicaLogDirsResponse) AppendTo(dst []byte) []byte
- func (v *AlterReplicaLogDirsResponse) Default()
- func (v *AlterReplicaLogDirsResponse) GetVersion() int16
- func (v *AlterReplicaLogDirsResponse) IsFlexible() bool
- func (*AlterReplicaLogDirsResponse) Key() int16
- func (*AlterReplicaLogDirsResponse) MaxVersion() int16
- func (v *AlterReplicaLogDirsResponse) ReadFrom(src []byte) error
- func (v *AlterReplicaLogDirsResponse) RequestKind() Request
- func (v *AlterReplicaLogDirsResponse) SetVersion(version int16)
- func (v *AlterReplicaLogDirsResponse) Throttle() (int32, bool)
- type AlterReplicaLogDirsResponseTopic
- type AlterReplicaLogDirsResponseTopicPartition
- type AlterUserSCRAMCredentialsRequest
- func (v *AlterUserSCRAMCredentialsRequest) AppendTo(dst []byte) []byte
- func (v *AlterUserSCRAMCredentialsRequest) Default()
- func (v *AlterUserSCRAMCredentialsRequest) GetVersion() int16
- func (v *AlterUserSCRAMCredentialsRequest) IsAdminRequest()
- func (v *AlterUserSCRAMCredentialsRequest) IsFlexible() bool
- func (*AlterUserSCRAMCredentialsRequest) Key() int16
- func (*AlterUserSCRAMCredentialsRequest) MaxVersion() int16
- func (v *AlterUserSCRAMCredentialsRequest) ReadFrom(src []byte) error
- func (v *AlterUserSCRAMCredentialsRequest) RequestWith(ctx context.Context, r Requestor) (*AlterUserSCRAMCredentialsResponse, error)
- func (v *AlterUserSCRAMCredentialsRequest) ResponseKind() Response
- func (v *AlterUserSCRAMCredentialsRequest) SetVersion(version int16)
- type AlterUserSCRAMCredentialsRequestDeletion
- type AlterUserSCRAMCredentialsRequestUpsertion
- type AlterUserSCRAMCredentialsResponse
- func (v *AlterUserSCRAMCredentialsResponse) AppendTo(dst []byte) []byte
- func (v *AlterUserSCRAMCredentialsResponse) Default()
- func (v *AlterUserSCRAMCredentialsResponse) GetVersion() int16
- func (v *AlterUserSCRAMCredentialsResponse) IsFlexible() bool
- func (*AlterUserSCRAMCredentialsResponse) Key() int16
- func (*AlterUserSCRAMCredentialsResponse) MaxVersion() int16
- func (v *AlterUserSCRAMCredentialsResponse) ReadFrom(src []byte) error
- func (v *AlterUserSCRAMCredentialsResponse) RequestKind() Request
- func (v *AlterUserSCRAMCredentialsResponse) SetVersion(version int16)
- func (v *AlterUserSCRAMCredentialsResponse) Throttle() (int32, bool)
- type AlterUserSCRAMCredentialsResponseResult
- type ApiVersionsRequest
- func (v *ApiVersionsRequest) AppendTo(dst []byte) []byte
- func (v *ApiVersionsRequest) Default()
- func (v *ApiVersionsRequest) GetVersion() int16
- func (v *ApiVersionsRequest) IsFlexible() bool
- func (*ApiVersionsRequest) Key() int16
- func (*ApiVersionsRequest) MaxVersion() int16
- func (v *ApiVersionsRequest) ReadFrom(src []byte) error
- func (v *ApiVersionsRequest) RequestWith(ctx context.Context, r Requestor) (*ApiVersionsResponse, error)
- func (v *ApiVersionsRequest) ResponseKind() Response
- func (v *ApiVersionsRequest) SetVersion(version int16)
- type ApiVersionsResponse
- func (v *ApiVersionsResponse) AppendTo(dst []byte) []byte
- func (v *ApiVersionsResponse) Default()
- func (v *ApiVersionsResponse) GetVersion() int16
- func (v *ApiVersionsResponse) IsFlexible() bool
- func (*ApiVersionsResponse) Key() int16
- func (*ApiVersionsResponse) MaxVersion() int16
- func (v *ApiVersionsResponse) ReadFrom(src []byte) error
- func (v *ApiVersionsResponse) RequestKind() Request
- func (v *ApiVersionsResponse) SetVersion(version int16)
- func (v *ApiVersionsResponse) Throttle() (int32, bool)
- type ApiVersionsResponseApiKey
- type ApiVersionsResponseFinalizedFeature
- type ApiVersionsResponseSupportedFeature
- type BeginQuorumEpochRequest
- func (v *BeginQuorumEpochRequest) AppendTo(dst []byte) []byte
- func (v *BeginQuorumEpochRequest) Default()
- func (v *BeginQuorumEpochRequest) GetVersion() int16
- func (v *BeginQuorumEpochRequest) IsAdminRequest()
- func (v *BeginQuorumEpochRequest) IsFlexible() bool
- func (*BeginQuorumEpochRequest) Key() int16
- func (*BeginQuorumEpochRequest) MaxVersion() int16
- func (v *BeginQuorumEpochRequest) ReadFrom(src []byte) error
- func (v *BeginQuorumEpochRequest) RequestWith(ctx context.Context, r Requestor) (*BeginQuorumEpochResponse, error)
- func (v *BeginQuorumEpochRequest) ResponseKind() Response
- func (v *BeginQuorumEpochRequest) SetVersion(version int16)
- type BeginQuorumEpochRequestTopic
- type BeginQuorumEpochRequestTopicPartition
- type BeginQuorumEpochResponse
- func (v *BeginQuorumEpochResponse) AppendTo(dst []byte) []byte
- func (v *BeginQuorumEpochResponse) Default()
- func (v *BeginQuorumEpochResponse) GetVersion() int16
- func (v *BeginQuorumEpochResponse) IsFlexible() bool
- func (*BeginQuorumEpochResponse) Key() int16
- func (*BeginQuorumEpochResponse) MaxVersion() int16
- func (v *BeginQuorumEpochResponse) ReadFrom(src []byte) error
- func (v *BeginQuorumEpochResponse) RequestKind() Request
- func (v *BeginQuorumEpochResponse) SetVersion(version int16)
- type BeginQuorumEpochResponseTopic
- type BeginQuorumEpochResponseTopicPartition
- type BrokerHeartbeatRequest
- func (v *BrokerHeartbeatRequest) AppendTo(dst []byte) []byte
- func (v *BrokerHeartbeatRequest) Default()
- func (v *BrokerHeartbeatRequest) GetVersion() int16
- func (v *BrokerHeartbeatRequest) IsFlexible() bool
- func (*BrokerHeartbeatRequest) Key() int16
- func (*BrokerHeartbeatRequest) MaxVersion() int16
- func (v *BrokerHeartbeatRequest) ReadFrom(src []byte) error
- func (v *BrokerHeartbeatRequest) RequestWith(ctx context.Context, r Requestor) (*BrokerHeartbeatResponse, error)
- func (v *BrokerHeartbeatRequest) ResponseKind() Response
- func (v *BrokerHeartbeatRequest) SetVersion(version int16)
- type BrokerHeartbeatResponse
- func (v *BrokerHeartbeatResponse) AppendTo(dst []byte) []byte
- func (v *BrokerHeartbeatResponse) Default()
- func (v *BrokerHeartbeatResponse) GetVersion() int16
- func (v *BrokerHeartbeatResponse) IsFlexible() bool
- func (*BrokerHeartbeatResponse) Key() int16
- func (*BrokerHeartbeatResponse) MaxVersion() int16
- func (v *BrokerHeartbeatResponse) ReadFrom(src []byte) error
- func (v *BrokerHeartbeatResponse) RequestKind() Request
- func (v *BrokerHeartbeatResponse) SetVersion(version int16)
- func (v *BrokerHeartbeatResponse) Throttle() (int32, bool)
- type BrokerRegistrationRequest
- func (v *BrokerRegistrationRequest) AppendTo(dst []byte) []byte
- func (v *BrokerRegistrationRequest) Default()
- func (v *BrokerRegistrationRequest) GetVersion() int16
- func (v *BrokerRegistrationRequest) IsFlexible() bool
- func (*BrokerRegistrationRequest) Key() int16
- func (*BrokerRegistrationRequest) MaxVersion() int16
- func (v *BrokerRegistrationRequest) ReadFrom(src []byte) error
- func (v *BrokerRegistrationRequest) RequestWith(ctx context.Context, r Requestor) (*BrokerRegistrationResponse, error)
- func (v *BrokerRegistrationRequest) ResponseKind() Response
- func (v *BrokerRegistrationRequest) SetVersion(version int16)
- type BrokerRegistrationRequestFeature
- type BrokerRegistrationRequestListener
- type BrokerRegistrationResponse
- func (v *BrokerRegistrationResponse) AppendTo(dst []byte) []byte
- func (v *BrokerRegistrationResponse) Default()
- func (v *BrokerRegistrationResponse) GetVersion() int16
- func (v *BrokerRegistrationResponse) IsFlexible() bool
- func (*BrokerRegistrationResponse) Key() int16
- func (*BrokerRegistrationResponse) MaxVersion() int16
- func (v *BrokerRegistrationResponse) ReadFrom(src []byte) error
- func (v *BrokerRegistrationResponse) RequestKind() Request
- func (v *BrokerRegistrationResponse) SetVersion(version int16)
- func (v *BrokerRegistrationResponse) Throttle() (int32, bool)
- type ConfigResourceType
- type ConfigSource
- type ConfigType
- type ControlRecordKey
- type ControlRecordKeyType
- type ControlledShutdownRequest
- func (v *ControlledShutdownRequest) AppendTo(dst []byte) []byte
- func (v *ControlledShutdownRequest) Default()
- func (v *ControlledShutdownRequest) GetVersion() int16
- func (v *ControlledShutdownRequest) IsFlexible() bool
- func (*ControlledShutdownRequest) Key() int16
- func (*ControlledShutdownRequest) MaxVersion() int16
- func (v *ControlledShutdownRequest) ReadFrom(src []byte) error
- func (v *ControlledShutdownRequest) RequestWith(ctx context.Context, r Requestor) (*ControlledShutdownResponse, error)
- func (v *ControlledShutdownRequest) ResponseKind() Response
- func (v *ControlledShutdownRequest) SetVersion(version int16)
- type ControlledShutdownResponse
- func (v *ControlledShutdownResponse) AppendTo(dst []byte) []byte
- func (v *ControlledShutdownResponse) Default()
- func (v *ControlledShutdownResponse) GetVersion() int16
- func (v *ControlledShutdownResponse) IsFlexible() bool
- func (*ControlledShutdownResponse) Key() int16
- func (*ControlledShutdownResponse) MaxVersion() int16
- func (v *ControlledShutdownResponse) ReadFrom(src []byte) error
- func (v *ControlledShutdownResponse) RequestKind() Request
- func (v *ControlledShutdownResponse) SetVersion(version int16)
- type ControlledShutdownResponsePartitionsRemaining
- type CreateACLsRequest
- func (v *CreateACLsRequest) AppendTo(dst []byte) []byte
- func (v *CreateACLsRequest) Default()
- func (v *CreateACLsRequest) GetVersion() int16
- func (v *CreateACLsRequest) IsFlexible() bool
- func (*CreateACLsRequest) Key() int16
- func (*CreateACLsRequest) MaxVersion() int16
- func (v *CreateACLsRequest) ReadFrom(src []byte) error
- func (v *CreateACLsRequest) RequestWith(ctx context.Context, r Requestor) (*CreateACLsResponse, error)
- func (v *CreateACLsRequest) ResponseKind() Response
- func (v *CreateACLsRequest) SetVersion(version int16)
- type CreateACLsRequestCreation
- type CreateACLsResponse
- func (v *CreateACLsResponse) AppendTo(dst []byte) []byte
- func (v *CreateACLsResponse) Default()
- func (v *CreateACLsResponse) GetVersion() int16
- func (v *CreateACLsResponse) IsFlexible() bool
- func (*CreateACLsResponse) Key() int16
- func (*CreateACLsResponse) MaxVersion() int16
- func (v *CreateACLsResponse) ReadFrom(src []byte) error
- func (v *CreateACLsResponse) RequestKind() Request
- func (v *CreateACLsResponse) SetVersion(version int16)
- func (v *CreateACLsResponse) Throttle() (int32, bool)
- type CreateACLsResponseResult
- type CreateDelegationTokenRequest
- func (v *CreateDelegationTokenRequest) AppendTo(dst []byte) []byte
- func (v *CreateDelegationTokenRequest) Default()
- func (v *CreateDelegationTokenRequest) GetVersion() int16
- func (v *CreateDelegationTokenRequest) IsFlexible() bool
- func (*CreateDelegationTokenRequest) Key() int16
- func (*CreateDelegationTokenRequest) MaxVersion() int16
- func (v *CreateDelegationTokenRequest) ReadFrom(src []byte) error
- func (v *CreateDelegationTokenRequest) RequestWith(ctx context.Context, r Requestor) (*CreateDelegationTokenResponse, error)
- func (v *CreateDelegationTokenRequest) ResponseKind() Response
- func (v *CreateDelegationTokenRequest) SetVersion(version int16)
- type CreateDelegationTokenRequestRenewer
- type CreateDelegationTokenResponse
- func (v *CreateDelegationTokenResponse) AppendTo(dst []byte) []byte
- func (v *CreateDelegationTokenResponse) Default()
- func (v *CreateDelegationTokenResponse) GetVersion() int16
- func (v *CreateDelegationTokenResponse) IsFlexible() bool
- func (*CreateDelegationTokenResponse) Key() int16
- func (*CreateDelegationTokenResponse) MaxVersion() int16
- func (v *CreateDelegationTokenResponse) ReadFrom(src []byte) error
- func (v *CreateDelegationTokenResponse) RequestKind() Request
- func (v *CreateDelegationTokenResponse) SetVersion(version int16)
- func (v *CreateDelegationTokenResponse) Throttle() (int32, bool)
- type CreatePartitionsRequest
- func (v *CreatePartitionsRequest) AppendTo(dst []byte) []byte
- func (v *CreatePartitionsRequest) Default()
- func (v *CreatePartitionsRequest) GetVersion() int16
- func (v *CreatePartitionsRequest) IsAdminRequest()
- func (v *CreatePartitionsRequest) IsFlexible() bool
- func (*CreatePartitionsRequest) Key() int16
- func (*CreatePartitionsRequest) MaxVersion() int16
- func (v *CreatePartitionsRequest) ReadFrom(src []byte) error
- func (v *CreatePartitionsRequest) RequestWith(ctx context.Context, r Requestor) (*CreatePartitionsResponse, error)
- func (v *CreatePartitionsRequest) ResponseKind() Response
- func (v *CreatePartitionsRequest) SetVersion(version int16)
- type CreatePartitionsRequestTopic
- type CreatePartitionsRequestTopicAssignment
- type CreatePartitionsResponse
- func (v *CreatePartitionsResponse) AppendTo(dst []byte) []byte
- func (v *CreatePartitionsResponse) Default()
- func (v *CreatePartitionsResponse) GetVersion() int16
- func (v *CreatePartitionsResponse) IsFlexible() bool
- func (*CreatePartitionsResponse) Key() int16
- func (*CreatePartitionsResponse) MaxVersion() int16
- func (v *CreatePartitionsResponse) ReadFrom(src []byte) error
- func (v *CreatePartitionsResponse) RequestKind() Request
- func (v *CreatePartitionsResponse) SetVersion(version int16)
- func (v *CreatePartitionsResponse) Throttle() (int32, bool)
- type CreatePartitionsResponseTopic
- type CreateTopicsRequest
- func (v *CreateTopicsRequest) AppendTo(dst []byte) []byte
- func (v *CreateTopicsRequest) Default()
- func (v *CreateTopicsRequest) GetVersion() int16
- func (v *CreateTopicsRequest) IsAdminRequest()
- func (v *CreateTopicsRequest) IsFlexible() bool
- func (*CreateTopicsRequest) Key() int16
- func (*CreateTopicsRequest) MaxVersion() int16
- func (v *CreateTopicsRequest) ReadFrom(src []byte) error
- func (v *CreateTopicsRequest) RequestWith(ctx context.Context, r Requestor) (*CreateTopicsResponse, error)
- func (v *CreateTopicsRequest) ResponseKind() Response
- func (v *CreateTopicsRequest) SetVersion(version int16)
- type CreateTopicsRequestTopic
- type CreateTopicsRequestTopicConfig
- type CreateTopicsRequestTopicReplicaAssignment
- type CreateTopicsResponse
- func (v *CreateTopicsResponse) AppendTo(dst []byte) []byte
- func (v *CreateTopicsResponse) Default()
- func (v *CreateTopicsResponse) GetVersion() int16
- func (v *CreateTopicsResponse) IsFlexible() bool
- func (*CreateTopicsResponse) Key() int16
- func (*CreateTopicsResponse) MaxVersion() int16
- func (v *CreateTopicsResponse) ReadFrom(src []byte) error
- func (v *CreateTopicsResponse) RequestKind() Request
- func (v *CreateTopicsResponse) SetVersion(version int16)
- func (v *CreateTopicsResponse) Throttle() (int32, bool)
- type CreateTopicsResponseTopic
- type CreateTopicsResponseTopicConfig
- type DefaultPrincipalData
- type DeleteACLsRequest
- func (v *DeleteACLsRequest) AppendTo(dst []byte) []byte
- func (v *DeleteACLsRequest) Default()
- func (v *DeleteACLsRequest) GetVersion() int16
- func (v *DeleteACLsRequest) IsFlexible() bool
- func (*DeleteACLsRequest) Key() int16
- func (*DeleteACLsRequest) MaxVersion() int16
- func (v *DeleteACLsRequest) ReadFrom(src []byte) error
- func (v *DeleteACLsRequest) RequestWith(ctx context.Context, r Requestor) (*DeleteACLsResponse, error)
- func (v *DeleteACLsRequest) ResponseKind() Response
- func (v *DeleteACLsRequest) SetVersion(version int16)
- type DeleteACLsRequestFilter
- type DeleteACLsResponse
- func (v *DeleteACLsResponse) AppendTo(dst []byte) []byte
- func (v *DeleteACLsResponse) Default()
- func (v *DeleteACLsResponse) GetVersion() int16
- func (v *DeleteACLsResponse) IsFlexible() bool
- func (*DeleteACLsResponse) Key() int16
- func (*DeleteACLsResponse) MaxVersion() int16
- func (v *DeleteACLsResponse) ReadFrom(src []byte) error
- func (v *DeleteACLsResponse) RequestKind() Request
- func (v *DeleteACLsResponse) SetVersion(version int16)
- func (v *DeleteACLsResponse) Throttle() (int32, bool)
- type DeleteACLsResponseResult
- type DeleteACLsResponseResultMatchingACL
- type DeleteGroupsRequest
- func (v *DeleteGroupsRequest) AppendTo(dst []byte) []byte
- func (v *DeleteGroupsRequest) Default()
- func (v *DeleteGroupsRequest) GetVersion() int16
- func (v *DeleteGroupsRequest) IsFlexible() bool
- func (v *DeleteGroupsRequest) IsGroupCoordinatorRequest()
- func (*DeleteGroupsRequest) Key() int16
- func (*DeleteGroupsRequest) MaxVersion() int16
- func (v *DeleteGroupsRequest) ReadFrom(src []byte) error
- func (v *DeleteGroupsRequest) RequestWith(ctx context.Context, r Requestor) (*DeleteGroupsResponse, error)
- func (v *DeleteGroupsRequest) ResponseKind() Response
- func (v *DeleteGroupsRequest) SetVersion(version int16)
- type DeleteGroupsResponse
- func (v *DeleteGroupsResponse) AppendTo(dst []byte) []byte
- func (v *DeleteGroupsResponse) Default()
- func (v *DeleteGroupsResponse) GetVersion() int16
- func (v *DeleteGroupsResponse) IsFlexible() bool
- func (*DeleteGroupsResponse) Key() int16
- func (*DeleteGroupsResponse) MaxVersion() int16
- func (v *DeleteGroupsResponse) ReadFrom(src []byte) error
- func (v *DeleteGroupsResponse) RequestKind() Request
- func (v *DeleteGroupsResponse) SetVersion(version int16)
- func (v *DeleteGroupsResponse) Throttle() (int32, bool)
- type DeleteGroupsResponseGroup
- type DeleteRecordsRequest
- func (v *DeleteRecordsRequest) AppendTo(dst []byte) []byte
- func (v *DeleteRecordsRequest) Default()
- func (v *DeleteRecordsRequest) GetVersion() int16
- func (v *DeleteRecordsRequest) IsFlexible() bool
- func (*DeleteRecordsRequest) Key() int16
- func (*DeleteRecordsRequest) MaxVersion() int16
- func (v *DeleteRecordsRequest) ReadFrom(src []byte) error
- func (v *DeleteRecordsRequest) RequestWith(ctx context.Context, r Requestor) (*DeleteRecordsResponse, error)
- func (v *DeleteRecordsRequest) ResponseKind() Response
- func (v *DeleteRecordsRequest) SetVersion(version int16)
- type DeleteRecordsRequestTopic
- type DeleteRecordsRequestTopicPartition
- type DeleteRecordsResponse
- func (v *DeleteRecordsResponse) AppendTo(dst []byte) []byte
- func (v *DeleteRecordsResponse) Default()
- func (v *DeleteRecordsResponse) GetVersion() int16
- func (v *DeleteRecordsResponse) IsFlexible() bool
- func (*DeleteRecordsResponse) Key() int16
- func (*DeleteRecordsResponse) MaxVersion() int16
- func (v *DeleteRecordsResponse) ReadFrom(src []byte) error
- func (v *DeleteRecordsResponse) RequestKind() Request
- func (v *DeleteRecordsResponse) SetVersion(version int16)
- func (v *DeleteRecordsResponse) Throttle() (int32, bool)
- type DeleteRecordsResponseTopic
- type DeleteRecordsResponseTopicPartition
- type DeleteTopicsRequest
- func (v *DeleteTopicsRequest) AppendTo(dst []byte) []byte
- func (v *DeleteTopicsRequest) Default()
- func (v *DeleteTopicsRequest) GetVersion() int16
- func (v *DeleteTopicsRequest) IsAdminRequest()
- func (v *DeleteTopicsRequest) IsFlexible() bool
- func (*DeleteTopicsRequest) Key() int16
- func (*DeleteTopicsRequest) MaxVersion() int16
- func (v *DeleteTopicsRequest) ReadFrom(src []byte) error
- func (v *DeleteTopicsRequest) RequestWith(ctx context.Context, r Requestor) (*DeleteTopicsResponse, error)
- func (v *DeleteTopicsRequest) ResponseKind() Response
- func (v *DeleteTopicsRequest) SetVersion(version int16)
- type DeleteTopicsRequestTopic
- type DeleteTopicsResponse
- func (v *DeleteTopicsResponse) AppendTo(dst []byte) []byte
- func (v *DeleteTopicsResponse) Default()
- func (v *DeleteTopicsResponse) GetVersion() int16
- func (v *DeleteTopicsResponse) IsFlexible() bool
- func (*DeleteTopicsResponse) Key() int16
- func (*DeleteTopicsResponse) MaxVersion() int16
- func (v *DeleteTopicsResponse) ReadFrom(src []byte) error
- func (v *DeleteTopicsResponse) RequestKind() Request
- func (v *DeleteTopicsResponse) SetVersion(version int16)
- func (v *DeleteTopicsResponse) Throttle() (int32, bool)
- type DeleteTopicsResponseTopic
- type DescribeACLsRequest
- func (v *DescribeACLsRequest) AppendTo(dst []byte) []byte
- func (v *DescribeACLsRequest) Default()
- func (v *DescribeACLsRequest) GetVersion() int16
- func (v *DescribeACLsRequest) IsFlexible() bool
- func (*DescribeACLsRequest) Key() int16
- func (*DescribeACLsRequest) MaxVersion() int16
- func (v *DescribeACLsRequest) ReadFrom(src []byte) error
- func (v *DescribeACLsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeACLsResponse, error)
- func (v *DescribeACLsRequest) ResponseKind() Response
- func (v *DescribeACLsRequest) SetVersion(version int16)
- type DescribeACLsResponse
- func (v *DescribeACLsResponse) AppendTo(dst []byte) []byte
- func (v *DescribeACLsResponse) Default()
- func (v *DescribeACLsResponse) GetVersion() int16
- func (v *DescribeACLsResponse) IsFlexible() bool
- func (*DescribeACLsResponse) Key() int16
- func (*DescribeACLsResponse) MaxVersion() int16
- func (v *DescribeACLsResponse) ReadFrom(src []byte) error
- func (v *DescribeACLsResponse) RequestKind() Request
- func (v *DescribeACLsResponse) SetVersion(version int16)
- func (v *DescribeACLsResponse) Throttle() (int32, bool)
- type DescribeACLsResponseResource
- type DescribeACLsResponseResourceACL
- type DescribeClientQuotasRequest
- func (v *DescribeClientQuotasRequest) AppendTo(dst []byte) []byte
- func (v *DescribeClientQuotasRequest) Default()
- func (v *DescribeClientQuotasRequest) GetVersion() int16
- func (v *DescribeClientQuotasRequest) IsFlexible() bool
- func (*DescribeClientQuotasRequest) Key() int16
- func (*DescribeClientQuotasRequest) MaxVersion() int16
- func (v *DescribeClientQuotasRequest) ReadFrom(src []byte) error
- func (v *DescribeClientQuotasRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeClientQuotasResponse, error)
- func (v *DescribeClientQuotasRequest) ResponseKind() Response
- func (v *DescribeClientQuotasRequest) SetVersion(version int16)
- type DescribeClientQuotasRequestComponent
- type DescribeClientQuotasResponse
- func (v *DescribeClientQuotasResponse) AppendTo(dst []byte) []byte
- func (v *DescribeClientQuotasResponse) Default()
- func (v *DescribeClientQuotasResponse) GetVersion() int16
- func (v *DescribeClientQuotasResponse) IsFlexible() bool
- func (*DescribeClientQuotasResponse) Key() int16
- func (*DescribeClientQuotasResponse) MaxVersion() int16
- func (v *DescribeClientQuotasResponse) ReadFrom(src []byte) error
- func (v *DescribeClientQuotasResponse) RequestKind() Request
- func (v *DescribeClientQuotasResponse) SetVersion(version int16)
- func (v *DescribeClientQuotasResponse) Throttle() (int32, bool)
- type DescribeClientQuotasResponseEntry
- type DescribeClientQuotasResponseEntryEntity
- type DescribeClientQuotasResponseEntryValue
- type DescribeClusterRequest
- func (v *DescribeClusterRequest) AppendTo(dst []byte) []byte
- func (v *DescribeClusterRequest) Default()
- func (v *DescribeClusterRequest) GetVersion() int16
- func (v *DescribeClusterRequest) IsFlexible() bool
- func (*DescribeClusterRequest) Key() int16
- func (*DescribeClusterRequest) MaxVersion() int16
- func (v *DescribeClusterRequest) ReadFrom(src []byte) error
- func (v *DescribeClusterRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeClusterResponse, error)
- func (v *DescribeClusterRequest) ResponseKind() Response
- func (v *DescribeClusterRequest) SetVersion(version int16)
- type DescribeClusterResponse
- func (v *DescribeClusterResponse) AppendTo(dst []byte) []byte
- func (v *DescribeClusterResponse) Default()
- func (v *DescribeClusterResponse) GetVersion() int16
- func (v *DescribeClusterResponse) IsFlexible() bool
- func (*DescribeClusterResponse) Key() int16
- func (*DescribeClusterResponse) MaxVersion() int16
- func (v *DescribeClusterResponse) ReadFrom(src []byte) error
- func (v *DescribeClusterResponse) RequestKind() Request
- func (v *DescribeClusterResponse) SetVersion(version int16)
- func (v *DescribeClusterResponse) Throttle() (int32, bool)
- type DescribeClusterResponseBroker
- type DescribeConfigsRequest
- func (v *DescribeConfigsRequest) AppendTo(dst []byte) []byte
- func (v *DescribeConfigsRequest) Default()
- func (v *DescribeConfigsRequest) GetVersion() int16
- func (v *DescribeConfigsRequest) IsFlexible() bool
- func (*DescribeConfigsRequest) Key() int16
- func (*DescribeConfigsRequest) MaxVersion() int16
- func (v *DescribeConfigsRequest) ReadFrom(src []byte) error
- func (v *DescribeConfigsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeConfigsResponse, error)
- func (v *DescribeConfigsRequest) ResponseKind() Response
- func (v *DescribeConfigsRequest) SetVersion(version int16)
- type DescribeConfigsRequestResource
- type DescribeConfigsResponse
- func (v *DescribeConfigsResponse) AppendTo(dst []byte) []byte
- func (v *DescribeConfigsResponse) Default()
- func (v *DescribeConfigsResponse) GetVersion() int16
- func (v *DescribeConfigsResponse) IsFlexible() bool
- func (*DescribeConfigsResponse) Key() int16
- func (*DescribeConfigsResponse) MaxVersion() int16
- func (v *DescribeConfigsResponse) ReadFrom(src []byte) error
- func (v *DescribeConfigsResponse) RequestKind() Request
- func (v *DescribeConfigsResponse) SetVersion(version int16)
- func (v *DescribeConfigsResponse) Throttle() (int32, bool)
- type DescribeConfigsResponseResource
- type DescribeConfigsResponseResourceConfig
- type DescribeConfigsResponseResourceConfigConfigSynonym
- type DescribeDelegationTokenRequest
- func (v *DescribeDelegationTokenRequest) AppendTo(dst []byte) []byte
- func (v *DescribeDelegationTokenRequest) Default()
- func (v *DescribeDelegationTokenRequest) GetVersion() int16
- func (v *DescribeDelegationTokenRequest) IsFlexible() bool
- func (*DescribeDelegationTokenRequest) Key() int16
- func (*DescribeDelegationTokenRequest) MaxVersion() int16
- func (v *DescribeDelegationTokenRequest) ReadFrom(src []byte) error
- func (v *DescribeDelegationTokenRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeDelegationTokenResponse, error)
- func (v *DescribeDelegationTokenRequest) ResponseKind() Response
- func (v *DescribeDelegationTokenRequest) SetVersion(version int16)
- type DescribeDelegationTokenRequestOwner
- type DescribeDelegationTokenResponse
- func (v *DescribeDelegationTokenResponse) AppendTo(dst []byte) []byte
- func (v *DescribeDelegationTokenResponse) Default()
- func (v *DescribeDelegationTokenResponse) GetVersion() int16
- func (v *DescribeDelegationTokenResponse) IsFlexible() bool
- func (*DescribeDelegationTokenResponse) Key() int16
- func (*DescribeDelegationTokenResponse) MaxVersion() int16
- func (v *DescribeDelegationTokenResponse) ReadFrom(src []byte) error
- func (v *DescribeDelegationTokenResponse) RequestKind() Request
- func (v *DescribeDelegationTokenResponse) SetVersion(version int16)
- func (v *DescribeDelegationTokenResponse) Throttle() (int32, bool)
- type DescribeDelegationTokenResponseTokenDetail
- type DescribeDelegationTokenResponseTokenDetailRenewer
- type DescribeGroupsRequest
- func (v *DescribeGroupsRequest) AppendTo(dst []byte) []byte
- func (v *DescribeGroupsRequest) Default()
- func (v *DescribeGroupsRequest) GetVersion() int16
- func (v *DescribeGroupsRequest) IsFlexible() bool
- func (v *DescribeGroupsRequest) IsGroupCoordinatorRequest()
- func (*DescribeGroupsRequest) Key() int16
- func (*DescribeGroupsRequest) MaxVersion() int16
- func (v *DescribeGroupsRequest) ReadFrom(src []byte) error
- func (v *DescribeGroupsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeGroupsResponse, error)
- func (v *DescribeGroupsRequest) ResponseKind() Response
- func (v *DescribeGroupsRequest) SetVersion(version int16)
- type DescribeGroupsResponse
- func (v *DescribeGroupsResponse) AppendTo(dst []byte) []byte
- func (v *DescribeGroupsResponse) Default()
- func (v *DescribeGroupsResponse) GetVersion() int16
- func (v *DescribeGroupsResponse) IsFlexible() bool
- func (*DescribeGroupsResponse) Key() int16
- func (*DescribeGroupsResponse) MaxVersion() int16
- func (v *DescribeGroupsResponse) ReadFrom(src []byte) error
- func (v *DescribeGroupsResponse) RequestKind() Request
- func (v *DescribeGroupsResponse) SetVersion(version int16)
- func (v *DescribeGroupsResponse) Throttle() (int32, bool)
- type DescribeGroupsResponseGroup
- type DescribeGroupsResponseGroupMember
- type DescribeLogDirsRequest
- func (v *DescribeLogDirsRequest) AppendTo(dst []byte) []byte
- func (v *DescribeLogDirsRequest) Default()
- func (v *DescribeLogDirsRequest) GetVersion() int16
- func (v *DescribeLogDirsRequest) IsFlexible() bool
- func (*DescribeLogDirsRequest) Key() int16
- func (*DescribeLogDirsRequest) MaxVersion() int16
- func (v *DescribeLogDirsRequest) ReadFrom(src []byte) error
- func (v *DescribeLogDirsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeLogDirsResponse, error)
- func (v *DescribeLogDirsRequest) ResponseKind() Response
- func (v *DescribeLogDirsRequest) SetVersion(version int16)
- type DescribeLogDirsRequestTopic
- type DescribeLogDirsResponse
- func (v *DescribeLogDirsResponse) AppendTo(dst []byte) []byte
- func (v *DescribeLogDirsResponse) Default()
- func (v *DescribeLogDirsResponse) GetVersion() int16
- func (v *DescribeLogDirsResponse) IsFlexible() bool
- func (*DescribeLogDirsResponse) Key() int16
- func (*DescribeLogDirsResponse) MaxVersion() int16
- func (v *DescribeLogDirsResponse) ReadFrom(src []byte) error
- func (v *DescribeLogDirsResponse) RequestKind() Request
- func (v *DescribeLogDirsResponse) SetVersion(version int16)
- func (v *DescribeLogDirsResponse) Throttle() (int32, bool)
- type DescribeLogDirsResponseDir
- type DescribeLogDirsResponseDirTopic
- type DescribeLogDirsResponseDirTopicPartition
- type DescribeProducersRequest
- func (v *DescribeProducersRequest) AppendTo(dst []byte) []byte
- func (v *DescribeProducersRequest) Default()
- func (v *DescribeProducersRequest) GetVersion() int16
- func (v *DescribeProducersRequest) IsFlexible() bool
- func (*DescribeProducersRequest) Key() int16
- func (*DescribeProducersRequest) MaxVersion() int16
- func (v *DescribeProducersRequest) ReadFrom(src []byte) error
- func (v *DescribeProducersRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeProducersResponse, error)
- func (v *DescribeProducersRequest) ResponseKind() Response
- func (v *DescribeProducersRequest) SetVersion(version int16)
- type DescribeProducersRequestTopic
- type DescribeProducersResponse
- func (v *DescribeProducersResponse) AppendTo(dst []byte) []byte
- func (v *DescribeProducersResponse) Default()
- func (v *DescribeProducersResponse) GetVersion() int16
- func (v *DescribeProducersResponse) IsFlexible() bool
- func (*DescribeProducersResponse) Key() int16
- func (*DescribeProducersResponse) MaxVersion() int16
- func (v *DescribeProducersResponse) ReadFrom(src []byte) error
- func (v *DescribeProducersResponse) RequestKind() Request
- func (v *DescribeProducersResponse) SetVersion(version int16)
- func (v *DescribeProducersResponse) Throttle() (int32, bool)
- type DescribeProducersResponseTopic
- type DescribeProducersResponseTopicPartition
- type DescribeProducersResponseTopicPartitionActiveProducer
- type DescribeQuorumRequest
- func (v *DescribeQuorumRequest) AppendTo(dst []byte) []byte
- func (v *DescribeQuorumRequest) Default()
- func (v *DescribeQuorumRequest) GetVersion() int16
- func (v *DescribeQuorumRequest) IsAdminRequest()
- func (v *DescribeQuorumRequest) IsFlexible() bool
- func (*DescribeQuorumRequest) Key() int16
- func (*DescribeQuorumRequest) MaxVersion() int16
- func (v *DescribeQuorumRequest) ReadFrom(src []byte) error
- func (v *DescribeQuorumRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeQuorumResponse, error)
- func (v *DescribeQuorumRequest) ResponseKind() Response
- func (v *DescribeQuorumRequest) SetVersion(version int16)
- type DescribeQuorumRequestTopic
- type DescribeQuorumRequestTopicPartition
- type DescribeQuorumResponse
- func (v *DescribeQuorumResponse) AppendTo(dst []byte) []byte
- func (v *DescribeQuorumResponse) Default()
- func (v *DescribeQuorumResponse) GetVersion() int16
- func (v *DescribeQuorumResponse) IsFlexible() bool
- func (*DescribeQuorumResponse) Key() int16
- func (*DescribeQuorumResponse) MaxVersion() int16
- func (v *DescribeQuorumResponse) ReadFrom(src []byte) error
- func (v *DescribeQuorumResponse) RequestKind() Request
- func (v *DescribeQuorumResponse) SetVersion(version int16)
- type DescribeQuorumResponseTopic
- type DescribeQuorumResponseTopicPartition
- type DescribeQuorumResponseTopicPartitionReplicaState
- type DescribeTransactionsRequest
- func (v *DescribeTransactionsRequest) AppendTo(dst []byte) []byte
- func (v *DescribeTransactionsRequest) Default()
- func (v *DescribeTransactionsRequest) GetVersion() int16
- func (v *DescribeTransactionsRequest) IsFlexible() bool
- func (*DescribeTransactionsRequest) Key() int16
- func (*DescribeTransactionsRequest) MaxVersion() int16
- func (v *DescribeTransactionsRequest) ReadFrom(src []byte) error
- func (v *DescribeTransactionsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeTransactionsResponse, error)
- func (v *DescribeTransactionsRequest) ResponseKind() Response
- func (v *DescribeTransactionsRequest) SetVersion(version int16)
- type DescribeTransactionsResponse
- func (v *DescribeTransactionsResponse) AppendTo(dst []byte) []byte
- func (v *DescribeTransactionsResponse) Default()
- func (v *DescribeTransactionsResponse) GetVersion() int16
- func (v *DescribeTransactionsResponse) IsFlexible() bool
- func (*DescribeTransactionsResponse) Key() int16
- func (*DescribeTransactionsResponse) MaxVersion() int16
- func (v *DescribeTransactionsResponse) ReadFrom(src []byte) error
- func (v *DescribeTransactionsResponse) RequestKind() Request
- func (v *DescribeTransactionsResponse) SetVersion(version int16)
- func (v *DescribeTransactionsResponse) Throttle() (int32, bool)
- type DescribeTransactionsResponseTransactionState
- type DescribeTransactionsResponseTransactionStateTopic
- type DescribeUserSCRAMCredentialsRequest
- func (v *DescribeUserSCRAMCredentialsRequest) AppendTo(dst []byte) []byte
- func (v *DescribeUserSCRAMCredentialsRequest) Default()
- func (v *DescribeUserSCRAMCredentialsRequest) GetVersion() int16
- func (v *DescribeUserSCRAMCredentialsRequest) IsFlexible() bool
- func (*DescribeUserSCRAMCredentialsRequest) Key() int16
- func (*DescribeUserSCRAMCredentialsRequest) MaxVersion() int16
- func (v *DescribeUserSCRAMCredentialsRequest) ReadFrom(src []byte) error
- func (v *DescribeUserSCRAMCredentialsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeUserSCRAMCredentialsResponse, error)
- func (v *DescribeUserSCRAMCredentialsRequest) ResponseKind() Response
- func (v *DescribeUserSCRAMCredentialsRequest) SetVersion(version int16)
- type DescribeUserSCRAMCredentialsRequestUser
- type DescribeUserSCRAMCredentialsResponse
- func (v *DescribeUserSCRAMCredentialsResponse) AppendTo(dst []byte) []byte
- func (v *DescribeUserSCRAMCredentialsResponse) Default()
- func (v *DescribeUserSCRAMCredentialsResponse) GetVersion() int16
- func (v *DescribeUserSCRAMCredentialsResponse) IsFlexible() bool
- func (*DescribeUserSCRAMCredentialsResponse) Key() int16
- func (*DescribeUserSCRAMCredentialsResponse) MaxVersion() int16
- func (v *DescribeUserSCRAMCredentialsResponse) ReadFrom(src []byte) error
- func (v *DescribeUserSCRAMCredentialsResponse) RequestKind() Request
- func (v *DescribeUserSCRAMCredentialsResponse) SetVersion(version int16)
- func (v *DescribeUserSCRAMCredentialsResponse) Throttle() (int32, bool)
- type DescribeUserSCRAMCredentialsResponseResult
- type DescribeUserSCRAMCredentialsResponseResultCredentialInfo
- type ElectLeadersRequest
- func (v *ElectLeadersRequest) AppendTo(dst []byte) []byte
- func (v *ElectLeadersRequest) Default()
- func (v *ElectLeadersRequest) GetVersion() int16
- func (v *ElectLeadersRequest) IsAdminRequest()
- func (v *ElectLeadersRequest) IsFlexible() bool
- func (*ElectLeadersRequest) Key() int16
- func (*ElectLeadersRequest) MaxVersion() int16
- func (v *ElectLeadersRequest) ReadFrom(src []byte) error
- func (v *ElectLeadersRequest) RequestWith(ctx context.Context, r Requestor) (*ElectLeadersResponse, error)
- func (v *ElectLeadersRequest) ResponseKind() Response
- func (v *ElectLeadersRequest) SetVersion(version int16)
- type ElectLeadersRequestTopic
- type ElectLeadersResponse
- func (v *ElectLeadersResponse) AppendTo(dst []byte) []byte
- func (v *ElectLeadersResponse) Default()
- func (v *ElectLeadersResponse) GetVersion() int16
- func (v *ElectLeadersResponse) IsFlexible() bool
- func (*ElectLeadersResponse) Key() int16
- func (*ElectLeadersResponse) MaxVersion() int16
- func (v *ElectLeadersResponse) ReadFrom(src []byte) error
- func (v *ElectLeadersResponse) RequestKind() Request
- func (v *ElectLeadersResponse) SetVersion(version int16)
- func (v *ElectLeadersResponse) Throttle() (int32, bool)
- type ElectLeadersResponseTopic
- type ElectLeadersResponseTopicPartition
- type EndQuorumEpochRequest
- func (v *EndQuorumEpochRequest) AppendTo(dst []byte) []byte
- func (v *EndQuorumEpochRequest) Default()
- func (v *EndQuorumEpochRequest) GetVersion() int16
- func (v *EndQuorumEpochRequest) IsAdminRequest()
- func (v *EndQuorumEpochRequest) IsFlexible() bool
- func (*EndQuorumEpochRequest) Key() int16
- func (*EndQuorumEpochRequest) MaxVersion() int16
- func (v *EndQuorumEpochRequest) ReadFrom(src []byte) error
- func (v *EndQuorumEpochRequest) RequestWith(ctx context.Context, r Requestor) (*EndQuorumEpochResponse, error)
- func (v *EndQuorumEpochRequest) ResponseKind() Response
- func (v *EndQuorumEpochRequest) SetVersion(version int16)
- type EndQuorumEpochRequestTopic
- type EndQuorumEpochRequestTopicPartition
- type EndQuorumEpochResponse
- func (v *EndQuorumEpochResponse) AppendTo(dst []byte) []byte
- func (v *EndQuorumEpochResponse) Default()
- func (v *EndQuorumEpochResponse) GetVersion() int16
- func (v *EndQuorumEpochResponse) IsFlexible() bool
- func (*EndQuorumEpochResponse) Key() int16
- func (*EndQuorumEpochResponse) MaxVersion() int16
- func (v *EndQuorumEpochResponse) ReadFrom(src []byte) error
- func (v *EndQuorumEpochResponse) RequestKind() Request
- func (v *EndQuorumEpochResponse) SetVersion(version int16)
- type EndQuorumEpochResponseTopic
- type EndQuorumEpochResponseTopicPartition
- type EndTxnMarker
- type EndTxnRequest
- func (v *EndTxnRequest) AppendTo(dst []byte) []byte
- func (v *EndTxnRequest) Default()
- func (v *EndTxnRequest) GetVersion() int16
- func (v *EndTxnRequest) IsFlexible() bool
- func (v *EndTxnRequest) IsTxnCoordinatorRequest()
- func (*EndTxnRequest) Key() int16
- func (*EndTxnRequest) MaxVersion() int16
- func (v *EndTxnRequest) ReadFrom(src []byte) error
- func (v *EndTxnRequest) RequestWith(ctx context.Context, r Requestor) (*EndTxnResponse, error)
- func (v *EndTxnRequest) ResponseKind() Response
- func (v *EndTxnRequest) SetVersion(version int16)
- type EndTxnResponse
- func (v *EndTxnResponse) AppendTo(dst []byte) []byte
- func (v *EndTxnResponse) Default()
- func (v *EndTxnResponse) GetVersion() int16
- func (v *EndTxnResponse) IsFlexible() bool
- func (*EndTxnResponse) Key() int16
- func (*EndTxnResponse) MaxVersion() int16
- func (v *EndTxnResponse) ReadFrom(src []byte) error
- func (v *EndTxnResponse) RequestKind() Request
- func (v *EndTxnResponse) SetVersion(version int16)
- func (v *EndTxnResponse) Throttle() (int32, bool)
- type EnvelopeRequest
- func (v *EnvelopeRequest) AppendTo(dst []byte) []byte
- func (v *EnvelopeRequest) Default()
- func (v *EnvelopeRequest) GetVersion() int16
- func (v *EnvelopeRequest) IsAdminRequest()
- func (v *EnvelopeRequest) IsFlexible() bool
- func (*EnvelopeRequest) Key() int16
- func (*EnvelopeRequest) MaxVersion() int16
- func (v *EnvelopeRequest) ReadFrom(src []byte) error
- func (v *EnvelopeRequest) RequestWith(ctx context.Context, r Requestor) (*EnvelopeResponse, error)
- func (v *EnvelopeRequest) ResponseKind() Response
- func (v *EnvelopeRequest) SetVersion(version int16)
- type EnvelopeResponse
- func (v *EnvelopeResponse) AppendTo(dst []byte) []byte
- func (v *EnvelopeResponse) Default()
- func (v *EnvelopeResponse) GetVersion() int16
- func (v *EnvelopeResponse) IsFlexible() bool
- func (*EnvelopeResponse) Key() int16
- func (*EnvelopeResponse) MaxVersion() int16
- func (v *EnvelopeResponse) ReadFrom(src []byte) error
- func (v *EnvelopeResponse) RequestKind() Request
- func (v *EnvelopeResponse) SetVersion(version int16)
- type ExpireDelegationTokenRequest
- func (v *ExpireDelegationTokenRequest) AppendTo(dst []byte) []byte
- func (v *ExpireDelegationTokenRequest) Default()
- func (v *ExpireDelegationTokenRequest) GetVersion() int16
- func (v *ExpireDelegationTokenRequest) IsFlexible() bool
- func (*ExpireDelegationTokenRequest) Key() int16
- func (*ExpireDelegationTokenRequest) MaxVersion() int16
- func (v *ExpireDelegationTokenRequest) ReadFrom(src []byte) error
- func (v *ExpireDelegationTokenRequest) RequestWith(ctx context.Context, r Requestor) (*ExpireDelegationTokenResponse, error)
- func (v *ExpireDelegationTokenRequest) ResponseKind() Response
- func (v *ExpireDelegationTokenRequest) SetVersion(version int16)
- type ExpireDelegationTokenResponse
- func (v *ExpireDelegationTokenResponse) AppendTo(dst []byte) []byte
- func (v *ExpireDelegationTokenResponse) Default()
- func (v *ExpireDelegationTokenResponse) GetVersion() int16
- func (v *ExpireDelegationTokenResponse) IsFlexible() bool
- func (*ExpireDelegationTokenResponse) Key() int16
- func (*ExpireDelegationTokenResponse) MaxVersion() int16
- func (v *ExpireDelegationTokenResponse) ReadFrom(src []byte) error
- func (v *ExpireDelegationTokenResponse) RequestKind() Request
- func (v *ExpireDelegationTokenResponse) SetVersion(version int16)
- func (v *ExpireDelegationTokenResponse) Throttle() (int32, bool)
- type FetchRequest
- func (v *FetchRequest) AppendTo(dst []byte) []byte
- func (v *FetchRequest) Default()
- func (v *FetchRequest) GetVersion() int16
- func (v *FetchRequest) IsFlexible() bool
- func (*FetchRequest) Key() int16
- func (*FetchRequest) MaxVersion() int16
- func (v *FetchRequest) ReadFrom(src []byte) error
- func (v *FetchRequest) RequestWith(ctx context.Context, r Requestor) (*FetchResponse, error)
- func (v *FetchRequest) ResponseKind() Response
- func (v *FetchRequest) SetVersion(version int16)
- type FetchRequestForgottenTopic
- type FetchRequestTopic
- type FetchRequestTopicPartition
- type FetchResponse
- func (v *FetchResponse) AppendTo(dst []byte) []byte
- func (v *FetchResponse) Default()
- func (v *FetchResponse) GetVersion() int16
- func (v *FetchResponse) IsFlexible() bool
- func (*FetchResponse) Key() int16
- func (*FetchResponse) MaxVersion() int16
- func (v *FetchResponse) ReadFrom(src []byte) error
- func (v *FetchResponse) RequestKind() Request
- func (v *FetchResponse) SetVersion(version int16)
- func (v *FetchResponse) Throttle() (int32, bool)
- type FetchResponseTopic
- type FetchResponseTopicPartition
- type FetchResponseTopicPartitionAbortedTransaction
- type FetchResponseTopicPartitionCurrentLeader
- type FetchResponseTopicPartitionDivergingEpoch
- type FetchResponseTopicPartitionSnapshotID
- type FetchSnapshotRequest
- func (v *FetchSnapshotRequest) AppendTo(dst []byte) []byte
- func (v *FetchSnapshotRequest) Default()
- func (v *FetchSnapshotRequest) GetVersion() int16
- func (v *FetchSnapshotRequest) IsFlexible() bool
- func (*FetchSnapshotRequest) Key() int16
- func (*FetchSnapshotRequest) MaxVersion() int16
- func (v *FetchSnapshotRequest) ReadFrom(src []byte) error
- func (v *FetchSnapshotRequest) RequestWith(ctx context.Context, r Requestor) (*FetchSnapshotResponse, error)
- func (v *FetchSnapshotRequest) ResponseKind() Response
- func (v *FetchSnapshotRequest) SetVersion(version int16)
- type FetchSnapshotRequestTopic
- type FetchSnapshotRequestTopicPartition
- type FetchSnapshotRequestTopicPartitionSnapshotID
- type FetchSnapshotResponse
- func (v *FetchSnapshotResponse) AppendTo(dst []byte) []byte
- func (v *FetchSnapshotResponse) Default()
- func (v *FetchSnapshotResponse) GetVersion() int16
- func (v *FetchSnapshotResponse) IsFlexible() bool
- func (*FetchSnapshotResponse) Key() int16
- func (*FetchSnapshotResponse) MaxVersion() int16
- func (v *FetchSnapshotResponse) ReadFrom(src []byte) error
- func (v *FetchSnapshotResponse) RequestKind() Request
- func (v *FetchSnapshotResponse) SetVersion(version int16)
- func (v *FetchSnapshotResponse) Throttle() (int32, bool)
- type FetchSnapshotResponseTopic
- type FetchSnapshotResponseTopicPartition
- type FetchSnapshotResponseTopicPartitionCurrentLeader
- type FetchSnapshotResponseTopicPartitionSnapshotID
- type FindCoordinatorRequest
- func (v *FindCoordinatorRequest) AppendTo(dst []byte) []byte
- func (v *FindCoordinatorRequest) Default()
- func (v *FindCoordinatorRequest) GetVersion() int16
- func (v *FindCoordinatorRequest) IsFlexible() bool
- func (*FindCoordinatorRequest) Key() int16
- func (*FindCoordinatorRequest) MaxVersion() int16
- func (v *FindCoordinatorRequest) ReadFrom(src []byte) error
- func (v *FindCoordinatorRequest) RequestWith(ctx context.Context, r Requestor) (*FindCoordinatorResponse, error)
- func (v *FindCoordinatorRequest) ResponseKind() Response
- func (v *FindCoordinatorRequest) SetVersion(version int16)
- type FindCoordinatorResponse
- func (v *FindCoordinatorResponse) AppendTo(dst []byte) []byte
- func (v *FindCoordinatorResponse) Default()
- func (v *FindCoordinatorResponse) GetVersion() int16
- func (v *FindCoordinatorResponse) IsFlexible() bool
- func (*FindCoordinatorResponse) Key() int16
- func (*FindCoordinatorResponse) MaxVersion() int16
- func (v *FindCoordinatorResponse) ReadFrom(src []byte) error
- func (v *FindCoordinatorResponse) RequestKind() Request
- func (v *FindCoordinatorResponse) SetVersion(version int16)
- func (v *FindCoordinatorResponse) Throttle() (int32, bool)
- type GroupCoordinatorRequest
- type GroupMemberAssignment
- type GroupMemberAssignmentTopic
- type GroupMemberMetadata
- type GroupMemberMetadataOwnedPartition
- type GroupMetadataKey
- type GroupMetadataValue
- type GroupMetadataValueMember
- type Header
- type HeartbeatRequest
- func (v *HeartbeatRequest) AppendTo(dst []byte) []byte
- func (v *HeartbeatRequest) Default()
- func (v *HeartbeatRequest) GetVersion() int16
- func (v *HeartbeatRequest) IsFlexible() bool
- func (v *HeartbeatRequest) IsGroupCoordinatorRequest()
- func (*HeartbeatRequest) Key() int16
- func (*HeartbeatRequest) MaxVersion() int16
- func (v *HeartbeatRequest) ReadFrom(src []byte) error
- func (v *HeartbeatRequest) RequestWith(ctx context.Context, r Requestor) (*HeartbeatResponse, error)
- func (v *HeartbeatRequest) ResponseKind() Response
- func (v *HeartbeatRequest) SetVersion(version int16)
- type HeartbeatResponse
- func (v *HeartbeatResponse) AppendTo(dst []byte) []byte
- func (v *HeartbeatResponse) Default()
- func (v *HeartbeatResponse) GetVersion() int16
- func (v *HeartbeatResponse) IsFlexible() bool
- func (*HeartbeatResponse) Key() int16
- func (*HeartbeatResponse) MaxVersion() int16
- func (v *HeartbeatResponse) ReadFrom(src []byte) error
- func (v *HeartbeatResponse) RequestKind() Request
- func (v *HeartbeatResponse) SetVersion(version int16)
- func (v *HeartbeatResponse) Throttle() (int32, bool)
- type IncrementalAlterConfigsRequest
- func (v *IncrementalAlterConfigsRequest) AppendTo(dst []byte) []byte
- func (v *IncrementalAlterConfigsRequest) Default()
- func (v *IncrementalAlterConfigsRequest) GetVersion() int16
- func (v *IncrementalAlterConfigsRequest) IsFlexible() bool
- func (*IncrementalAlterConfigsRequest) Key() int16
- func (*IncrementalAlterConfigsRequest) MaxVersion() int16
- func (v *IncrementalAlterConfigsRequest) ReadFrom(src []byte) error
- func (v *IncrementalAlterConfigsRequest) RequestWith(ctx context.Context, r Requestor) (*IncrementalAlterConfigsResponse, error)
- func (v *IncrementalAlterConfigsRequest) ResponseKind() Response
- func (v *IncrementalAlterConfigsRequest) SetVersion(version int16)
- type IncrementalAlterConfigsRequestResource
- type IncrementalAlterConfigsRequestResourceConfig
- type IncrementalAlterConfigsResponse
- func (v *IncrementalAlterConfigsResponse) AppendTo(dst []byte) []byte
- func (v *IncrementalAlterConfigsResponse) Default()
- func (v *IncrementalAlterConfigsResponse) GetVersion() int16
- func (v *IncrementalAlterConfigsResponse) IsFlexible() bool
- func (*IncrementalAlterConfigsResponse) Key() int16
- func (*IncrementalAlterConfigsResponse) MaxVersion() int16
- func (v *IncrementalAlterConfigsResponse) ReadFrom(src []byte) error
- func (v *IncrementalAlterConfigsResponse) RequestKind() Request
- func (v *IncrementalAlterConfigsResponse) SetVersion(version int16)
- func (v *IncrementalAlterConfigsResponse) Throttle() (int32, bool)
- type IncrementalAlterConfigsResponseResource
- type InitProducerIDRequest
- func (v *InitProducerIDRequest) AppendTo(dst []byte) []byte
- func (v *InitProducerIDRequest) Default()
- func (v *InitProducerIDRequest) GetVersion() int16
- func (v *InitProducerIDRequest) IsFlexible() bool
- func (v *InitProducerIDRequest) IsTxnCoordinatorRequest()
- func (*InitProducerIDRequest) Key() int16
- func (*InitProducerIDRequest) MaxVersion() int16
- func (v *InitProducerIDRequest) ReadFrom(src []byte) error
- func (v *InitProducerIDRequest) RequestWith(ctx context.Context, r Requestor) (*InitProducerIDResponse, error)
- func (v *InitProducerIDRequest) ResponseKind() Response
- func (v *InitProducerIDRequest) SetVersion(version int16)
- type InitProducerIDResponse
- func (v *InitProducerIDResponse) AppendTo(dst []byte) []byte
- func (v *InitProducerIDResponse) Default()
- func (v *InitProducerIDResponse) GetVersion() int16
- func (v *InitProducerIDResponse) IsFlexible() bool
- func (*InitProducerIDResponse) Key() int16
- func (*InitProducerIDResponse) MaxVersion() int16
- func (v *InitProducerIDResponse) ReadFrom(src []byte) error
- func (v *InitProducerIDResponse) RequestKind() Request
- func (v *InitProducerIDResponse) SetVersion(version int16)
- func (v *InitProducerIDResponse) Throttle() (int32, bool)
- type JoinGroupRequest
- func (v *JoinGroupRequest) AppendTo(dst []byte) []byte
- func (v *JoinGroupRequest) Default()
- func (v *JoinGroupRequest) GetVersion() int16
- func (v *JoinGroupRequest) IsFlexible() bool
- func (v *JoinGroupRequest) IsGroupCoordinatorRequest()
- func (*JoinGroupRequest) Key() int16
- func (*JoinGroupRequest) MaxVersion() int16
- func (v *JoinGroupRequest) ReadFrom(src []byte) error
- func (v *JoinGroupRequest) RequestWith(ctx context.Context, r Requestor) (*JoinGroupResponse, error)
- func (v *JoinGroupRequest) ResponseKind() Response
- func (v *JoinGroupRequest) SetVersion(version int16)
- type JoinGroupRequestProtocol
- type JoinGroupResponse
- func (v *JoinGroupResponse) AppendTo(dst []byte) []byte
- func (v *JoinGroupResponse) Default()
- func (v *JoinGroupResponse) GetVersion() int16
- func (v *JoinGroupResponse) IsFlexible() bool
- func (*JoinGroupResponse) Key() int16
- func (*JoinGroupResponse) MaxVersion() int16
- func (v *JoinGroupResponse) ReadFrom(src []byte) error
- func (v *JoinGroupResponse) RequestKind() Request
- func (v *JoinGroupResponse) SetVersion(version int16)
- func (v *JoinGroupResponse) Throttle() (int32, bool)
- type JoinGroupResponseMember
- type LeaderAndISRRequest
- func (v *LeaderAndISRRequest) AppendTo(dst []byte) []byte
- func (v *LeaderAndISRRequest) Default()
- func (v *LeaderAndISRRequest) GetVersion() int16
- func (v *LeaderAndISRRequest) IsFlexible() bool
- func (*LeaderAndISRRequest) Key() int16
- func (*LeaderAndISRRequest) MaxVersion() int16
- func (v *LeaderAndISRRequest) ReadFrom(src []byte) error
- func (v *LeaderAndISRRequest) RequestWith(ctx context.Context, r Requestor) (*LeaderAndISRResponse, error)
- func (v *LeaderAndISRRequest) ResponseKind() Response
- func (v *LeaderAndISRRequest) SetVersion(version int16)
- type LeaderAndISRRequestLiveLeader
- type LeaderAndISRRequestTopicPartition
- type LeaderAndISRRequestTopicState
- type LeaderAndISRResponse
- func (v *LeaderAndISRResponse) AppendTo(dst []byte) []byte
- func (v *LeaderAndISRResponse) Default()
- func (v *LeaderAndISRResponse) GetVersion() int16
- func (v *LeaderAndISRResponse) IsFlexible() bool
- func (*LeaderAndISRResponse) Key() int16
- func (*LeaderAndISRResponse) MaxVersion() int16
- func (v *LeaderAndISRResponse) ReadFrom(src []byte) error
- func (v *LeaderAndISRResponse) RequestKind() Request
- func (v *LeaderAndISRResponse) SetVersion(version int16)
- type LeaderAndISRResponseTopic
- type LeaderAndISRResponseTopicPartition
- type LeaderChangeMessage
- type LeaderChangeMessageVoter
- type LeaveGroupRequest
- func (v *LeaveGroupRequest) AppendTo(dst []byte) []byte
- func (v *LeaveGroupRequest) Default()
- func (v *LeaveGroupRequest) GetVersion() int16
- func (v *LeaveGroupRequest) IsFlexible() bool
- func (v *LeaveGroupRequest) IsGroupCoordinatorRequest()
- func (*LeaveGroupRequest) Key() int16
- func (*LeaveGroupRequest) MaxVersion() int16
- func (v *LeaveGroupRequest) ReadFrom(src []byte) error
- func (v *LeaveGroupRequest) RequestWith(ctx context.Context, r Requestor) (*LeaveGroupResponse, error)
- func (v *LeaveGroupRequest) ResponseKind() Response
- func (v *LeaveGroupRequest) SetVersion(version int16)
- type LeaveGroupRequestMember
- type LeaveGroupResponse
- func (v *LeaveGroupResponse) AppendTo(dst []byte) []byte
- func (v *LeaveGroupResponse) Default()
- func (v *LeaveGroupResponse) GetVersion() int16
- func (v *LeaveGroupResponse) IsFlexible() bool
- func (*LeaveGroupResponse) Key() int16
- func (*LeaveGroupResponse) MaxVersion() int16
- func (v *LeaveGroupResponse) ReadFrom(src []byte) error
- func (v *LeaveGroupResponse) RequestKind() Request
- func (v *LeaveGroupResponse) SetVersion(version int16)
- func (v *LeaveGroupResponse) Throttle() (int32, bool)
- type LeaveGroupResponseMember
- type ListGroupsRequest
- func (v *ListGroupsRequest) AppendTo(dst []byte) []byte
- func (v *ListGroupsRequest) Default()
- func (v *ListGroupsRequest) GetVersion() int16
- func (v *ListGroupsRequest) IsFlexible() bool
- func (*ListGroupsRequest) Key() int16
- func (*ListGroupsRequest) MaxVersion() int16
- func (v *ListGroupsRequest) ReadFrom(src []byte) error
- func (v *ListGroupsRequest) RequestWith(ctx context.Context, r Requestor) (*ListGroupsResponse, error)
- func (v *ListGroupsRequest) ResponseKind() Response
- func (v *ListGroupsRequest) SetVersion(version int16)
- type ListGroupsResponse
- func (v *ListGroupsResponse) AppendTo(dst []byte) []byte
- func (v *ListGroupsResponse) Default()
- func (v *ListGroupsResponse) GetVersion() int16
- func (v *ListGroupsResponse) IsFlexible() bool
- func (*ListGroupsResponse) Key() int16
- func (*ListGroupsResponse) MaxVersion() int16
- func (v *ListGroupsResponse) ReadFrom(src []byte) error
- func (v *ListGroupsResponse) RequestKind() Request
- func (v *ListGroupsResponse) SetVersion(version int16)
- func (v *ListGroupsResponse) Throttle() (int32, bool)
- type ListGroupsResponseGroup
- type ListOffsetsRequest
- func (v *ListOffsetsRequest) AppendTo(dst []byte) []byte
- func (v *ListOffsetsRequest) Default()
- func (v *ListOffsetsRequest) GetVersion() int16
- func (v *ListOffsetsRequest) IsFlexible() bool
- func (*ListOffsetsRequest) Key() int16
- func (*ListOffsetsRequest) MaxVersion() int16
- func (v *ListOffsetsRequest) ReadFrom(src []byte) error
- func (v *ListOffsetsRequest) RequestWith(ctx context.Context, r Requestor) (*ListOffsetsResponse, error)
- func (v *ListOffsetsRequest) ResponseKind() Response
- func (v *ListOffsetsRequest) SetVersion(version int16)
- type ListOffsetsRequestTopic
- type ListOffsetsRequestTopicPartition
- type ListOffsetsResponse
- func (v *ListOffsetsResponse) AppendTo(dst []byte) []byte
- func (v *ListOffsetsResponse) Default()
- func (v *ListOffsetsResponse) GetVersion() int16
- func (v *ListOffsetsResponse) IsFlexible() bool
- func (*ListOffsetsResponse) Key() int16
- func (*ListOffsetsResponse) MaxVersion() int16
- func (v *ListOffsetsResponse) ReadFrom(src []byte) error
- func (v *ListOffsetsResponse) RequestKind() Request
- func (v *ListOffsetsResponse) SetVersion(version int16)
- func (v *ListOffsetsResponse) Throttle() (int32, bool)
- type ListOffsetsResponseTopic
- type ListOffsetsResponseTopicPartition
- type ListPartitionReassignmentsRequest
- func (v *ListPartitionReassignmentsRequest) AppendTo(dst []byte) []byte
- func (v *ListPartitionReassignmentsRequest) Default()
- func (v *ListPartitionReassignmentsRequest) GetVersion() int16
- func (v *ListPartitionReassignmentsRequest) IsAdminRequest()
- func (v *ListPartitionReassignmentsRequest) IsFlexible() bool
- func (*ListPartitionReassignmentsRequest) Key() int16
- func (*ListPartitionReassignmentsRequest) MaxVersion() int16
- func (v *ListPartitionReassignmentsRequest) ReadFrom(src []byte) error
- func (v *ListPartitionReassignmentsRequest) RequestWith(ctx context.Context, r Requestor) (*ListPartitionReassignmentsResponse, error)
- func (v *ListPartitionReassignmentsRequest) ResponseKind() Response
- func (v *ListPartitionReassignmentsRequest) SetVersion(version int16)
- type ListPartitionReassignmentsRequestTopic
- type ListPartitionReassignmentsResponse
- func (v *ListPartitionReassignmentsResponse) AppendTo(dst []byte) []byte
- func (v *ListPartitionReassignmentsResponse) Default()
- func (v *ListPartitionReassignmentsResponse) GetVersion() int16
- func (v *ListPartitionReassignmentsResponse) IsFlexible() bool
- func (*ListPartitionReassignmentsResponse) Key() int16
- func (*ListPartitionReassignmentsResponse) MaxVersion() int16
- func (v *ListPartitionReassignmentsResponse) ReadFrom(src []byte) error
- func (v *ListPartitionReassignmentsResponse) RequestKind() Request
- func (v *ListPartitionReassignmentsResponse) SetVersion(version int16)
- func (v *ListPartitionReassignmentsResponse) Throttle() (int32, bool)
- type ListPartitionReassignmentsResponseTopic
- type ListPartitionReassignmentsResponseTopicPartition
- type ListTransactionsRequest
- func (v *ListTransactionsRequest) AppendTo(dst []byte) []byte
- func (v *ListTransactionsRequest) Default()
- func (v *ListTransactionsRequest) GetVersion() int16
- func (v *ListTransactionsRequest) IsFlexible() bool
- func (*ListTransactionsRequest) Key() int16
- func (*ListTransactionsRequest) MaxVersion() int16
- func (v *ListTransactionsRequest) ReadFrom(src []byte) error
- func (v *ListTransactionsRequest) RequestWith(ctx context.Context, r Requestor) (*ListTransactionsResponse, error)
- func (v *ListTransactionsRequest) ResponseKind() Response
- func (v *ListTransactionsRequest) SetVersion(version int16)
- type ListTransactionsResponse
- func (v *ListTransactionsResponse) AppendTo(dst []byte) []byte
- func (v *ListTransactionsResponse) Default()
- func (v *ListTransactionsResponse) GetVersion() int16
- func (v *ListTransactionsResponse) IsFlexible() bool
- func (*ListTransactionsResponse) Key() int16
- func (*ListTransactionsResponse) MaxVersion() int16
- func (v *ListTransactionsResponse) ReadFrom(src []byte) error
- func (v *ListTransactionsResponse) RequestKind() Request
- func (v *ListTransactionsResponse) SetVersion(version int16)
- func (v *ListTransactionsResponse) Throttle() (int32, bool)
- type ListTransactionsResponseTransactionState
- type MessageV0
- type MessageV1
- type MetadataRequest
- func (v *MetadataRequest) AppendTo(dst []byte) []byte
- func (v *MetadataRequest) Default()
- func (v *MetadataRequest) GetVersion() int16
- func (v *MetadataRequest) IsFlexible() bool
- func (*MetadataRequest) Key() int16
- func (*MetadataRequest) MaxVersion() int16
- func (v *MetadataRequest) ReadFrom(src []byte) error
- func (v *MetadataRequest) RequestWith(ctx context.Context, r Requestor) (*MetadataResponse, error)
- func (v *MetadataRequest) ResponseKind() Response
- func (v *MetadataRequest) SetVersion(version int16)
- type MetadataRequestTopic
- type MetadataResponse
- func (v *MetadataResponse) AppendTo(dst []byte) []byte
- func (v *MetadataResponse) Default()
- func (v *MetadataResponse) GetVersion() int16
- func (v *MetadataResponse) IsFlexible() bool
- func (*MetadataResponse) Key() int16
- func (*MetadataResponse) MaxVersion() int16
- func (v *MetadataResponse) ReadFrom(src []byte) error
- func (v *MetadataResponse) RequestKind() Request
- func (v *MetadataResponse) SetVersion(version int16)
- func (v *MetadataResponse) Throttle() (int32, bool)
- type MetadataResponseBroker
- type MetadataResponseTopic
- type MetadataResponseTopicPartition
- type OffsetCommitKey
- type OffsetCommitRequest
- func (v *OffsetCommitRequest) AppendTo(dst []byte) []byte
- func (v *OffsetCommitRequest) Default()
- func (v *OffsetCommitRequest) GetVersion() int16
- func (v *OffsetCommitRequest) IsFlexible() bool
- func (v *OffsetCommitRequest) IsGroupCoordinatorRequest()
- func (*OffsetCommitRequest) Key() int16
- func (*OffsetCommitRequest) MaxVersion() int16
- func (v *OffsetCommitRequest) ReadFrom(src []byte) error
- func (v *OffsetCommitRequest) RequestWith(ctx context.Context, r Requestor) (*OffsetCommitResponse, error)
- func (v *OffsetCommitRequest) ResponseKind() Response
- func (v *OffsetCommitRequest) SetVersion(version int16)
- type OffsetCommitRequestTopic
- type OffsetCommitRequestTopicPartition
- type OffsetCommitResponse
- func (v *OffsetCommitResponse) AppendTo(dst []byte) []byte
- func (v *OffsetCommitResponse) Default()
- func (v *OffsetCommitResponse) GetVersion() int16
- func (v *OffsetCommitResponse) IsFlexible() bool
- func (*OffsetCommitResponse) Key() int16
- func (*OffsetCommitResponse) MaxVersion() int16
- func (v *OffsetCommitResponse) ReadFrom(src []byte) error
- func (v *OffsetCommitResponse) RequestKind() Request
- func (v *OffsetCommitResponse) SetVersion(version int16)
- func (v *OffsetCommitResponse) Throttle() (int32, bool)
- type OffsetCommitResponseTopic
- type OffsetCommitResponseTopicPartition
- type OffsetCommitValue
- type OffsetDeleteRequest
- func (v *OffsetDeleteRequest) AppendTo(dst []byte) []byte
- func (v *OffsetDeleteRequest) Default()
- func (v *OffsetDeleteRequest) GetVersion() int16
- func (v *OffsetDeleteRequest) IsFlexible() bool
- func (v *OffsetDeleteRequest) IsGroupCoordinatorRequest()
- func (*OffsetDeleteRequest) Key() int16
- func (*OffsetDeleteRequest) MaxVersion() int16
- func (v *OffsetDeleteRequest) ReadFrom(src []byte) error
- func (v *OffsetDeleteRequest) RequestWith(ctx context.Context, r Requestor) (*OffsetDeleteResponse, error)
- func (v *OffsetDeleteRequest) ResponseKind() Response
- func (v *OffsetDeleteRequest) SetVersion(version int16)
- type OffsetDeleteRequestTopic
- type OffsetDeleteRequestTopicPartition
- type OffsetDeleteResponse
- func (v *OffsetDeleteResponse) AppendTo(dst []byte) []byte
- func (v *OffsetDeleteResponse) Default()
- func (v *OffsetDeleteResponse) GetVersion() int16
- func (v *OffsetDeleteResponse) IsFlexible() bool
- func (*OffsetDeleteResponse) Key() int16
- func (*OffsetDeleteResponse) MaxVersion() int16
- func (v *OffsetDeleteResponse) ReadFrom(src []byte) error
- func (v *OffsetDeleteResponse) RequestKind() Request
- func (v *OffsetDeleteResponse) SetVersion(version int16)
- func (v *OffsetDeleteResponse) Throttle() (int32, bool)
- type OffsetDeleteResponseTopic
- type OffsetDeleteResponseTopicPartition
- type OffsetFetchRequest
- func (v *OffsetFetchRequest) AppendTo(dst []byte) []byte
- func (v *OffsetFetchRequest) Default()
- func (v *OffsetFetchRequest) GetVersion() int16
- func (v *OffsetFetchRequest) IsFlexible() bool
- func (v *OffsetFetchRequest) IsGroupCoordinatorRequest()
- func (*OffsetFetchRequest) Key() int16
- func (*OffsetFetchRequest) MaxVersion() int16
- func (v *OffsetFetchRequest) ReadFrom(src []byte) error
- func (v *OffsetFetchRequest) RequestWith(ctx context.Context, r Requestor) (*OffsetFetchResponse, error)
- func (v *OffsetFetchRequest) ResponseKind() Response
- func (v *OffsetFetchRequest) SetVersion(version int16)
- type OffsetFetchRequestTopic
- type OffsetFetchResponse
- func (v *OffsetFetchResponse) AppendTo(dst []byte) []byte
- func (v *OffsetFetchResponse) Default()
- func (v *OffsetFetchResponse) GetVersion() int16
- func (v *OffsetFetchResponse) IsFlexible() bool
- func (*OffsetFetchResponse) Key() int16
- func (*OffsetFetchResponse) MaxVersion() int16
- func (v *OffsetFetchResponse) ReadFrom(src []byte) error
- func (v *OffsetFetchResponse) RequestKind() Request
- func (v *OffsetFetchResponse) SetVersion(version int16)
- func (v *OffsetFetchResponse) Throttle() (int32, bool)
- type OffsetFetchResponseTopic
- type OffsetFetchResponseTopicPartition
- type OffsetForLeaderEpochRequest
- func (v *OffsetForLeaderEpochRequest) AppendTo(dst []byte) []byte
- func (v *OffsetForLeaderEpochRequest) Default()
- func (v *OffsetForLeaderEpochRequest) GetVersion() int16
- func (v *OffsetForLeaderEpochRequest) IsFlexible() bool
- func (*OffsetForLeaderEpochRequest) Key() int16
- func (*OffsetForLeaderEpochRequest) MaxVersion() int16
- func (v *OffsetForLeaderEpochRequest) ReadFrom(src []byte) error
- func (v *OffsetForLeaderEpochRequest) RequestWith(ctx context.Context, r Requestor) (*OffsetForLeaderEpochResponse, error)
- func (v *OffsetForLeaderEpochRequest) ResponseKind() Response
- func (v *OffsetForLeaderEpochRequest) SetVersion(version int16)
- type OffsetForLeaderEpochRequestTopic
- type OffsetForLeaderEpochRequestTopicPartition
- type OffsetForLeaderEpochResponse
- func (v *OffsetForLeaderEpochResponse) AppendTo(dst []byte) []byte
- func (v *OffsetForLeaderEpochResponse) Default()
- func (v *OffsetForLeaderEpochResponse) GetVersion() int16
- func (v *OffsetForLeaderEpochResponse) IsFlexible() bool
- func (*OffsetForLeaderEpochResponse) Key() int16
- func (*OffsetForLeaderEpochResponse) MaxVersion() int16
- func (v *OffsetForLeaderEpochResponse) ReadFrom(src []byte) error
- func (v *OffsetForLeaderEpochResponse) RequestKind() Request
- func (v *OffsetForLeaderEpochResponse) SetVersion(version int16)
- func (v *OffsetForLeaderEpochResponse) Throttle() (int32, bool)
- type OffsetForLeaderEpochResponseTopic
- type OffsetForLeaderEpochResponseTopicPartition
- type ProduceRequest
- func (v *ProduceRequest) AppendTo(dst []byte) []byte
- func (v *ProduceRequest) Default()
- func (v *ProduceRequest) GetVersion() int16
- func (v *ProduceRequest) IsFlexible() bool
- func (*ProduceRequest) Key() int16
- func (*ProduceRequest) MaxVersion() int16
- func (v *ProduceRequest) ReadFrom(src []byte) error
- func (v *ProduceRequest) RequestWith(ctx context.Context, r Requestor) (*ProduceResponse, error)
- func (v *ProduceRequest) ResponseKind() Response
- func (v *ProduceRequest) SetVersion(version int16)
- type ProduceRequestTopic
- type ProduceRequestTopicPartition
- type ProduceResponse
- func (v *ProduceResponse) AppendTo(dst []byte) []byte
- func (v *ProduceResponse) Default()
- func (v *ProduceResponse) GetVersion() int16
- func (v *ProduceResponse) IsFlexible() bool
- func (*ProduceResponse) Key() int16
- func (*ProduceResponse) MaxVersion() int16
- func (v *ProduceResponse) ReadFrom(src []byte) error
- func (v *ProduceResponse) RequestKind() Request
- func (v *ProduceResponse) SetVersion(version int16)
- func (v *ProduceResponse) Throttle() (int32, bool)
- type ProduceResponseTopic
- type ProduceResponseTopicPartition
- type ProduceResponseTopicPartitionErrorRecord
- type Record
- type RecordBatch
- type RenewDelegationTokenRequest
- func (v *RenewDelegationTokenRequest) AppendTo(dst []byte) []byte
- func (v *RenewDelegationTokenRequest) Default()
- func (v *RenewDelegationTokenRequest) GetVersion() int16
- func (v *RenewDelegationTokenRequest) IsFlexible() bool
- func (*RenewDelegationTokenRequest) Key() int16
- func (*RenewDelegationTokenRequest) MaxVersion() int16
- func (v *RenewDelegationTokenRequest) ReadFrom(src []byte) error
- func (v *RenewDelegationTokenRequest) RequestWith(ctx context.Context, r Requestor) (*RenewDelegationTokenResponse, error)
- func (v *RenewDelegationTokenRequest) ResponseKind() Response
- func (v *RenewDelegationTokenRequest) SetVersion(version int16)
- type RenewDelegationTokenResponse
- func (v *RenewDelegationTokenResponse) AppendTo(dst []byte) []byte
- func (v *RenewDelegationTokenResponse) Default()
- func (v *RenewDelegationTokenResponse) GetVersion() int16
- func (v *RenewDelegationTokenResponse) IsFlexible() bool
- func (*RenewDelegationTokenResponse) Key() int16
- func (*RenewDelegationTokenResponse) MaxVersion() int16
- func (v *RenewDelegationTokenResponse) ReadFrom(src []byte) error
- func (v *RenewDelegationTokenResponse) RequestKind() Request
- func (v *RenewDelegationTokenResponse) SetVersion(version int16)
- func (v *RenewDelegationTokenResponse) Throttle() (int32, bool)
- type Request
- type RequestFormatter
- type RequestFormatterOpt
- type Requestor
- type Response
- type SASLAuthenticateRequest
- func (v *SASLAuthenticateRequest) AppendTo(dst []byte) []byte
- func (v *SASLAuthenticateRequest) Default()
- func (v *SASLAuthenticateRequest) GetVersion() int16
- func (v *SASLAuthenticateRequest) IsFlexible() bool
- func (*SASLAuthenticateRequest) Key() int16
- func (*SASLAuthenticateRequest) MaxVersion() int16
- func (v *SASLAuthenticateRequest) ReadFrom(src []byte) error
- func (v *SASLAuthenticateRequest) RequestWith(ctx context.Context, r Requestor) (*SASLAuthenticateResponse, error)
- func (v *SASLAuthenticateRequest) ResponseKind() Response
- func (v *SASLAuthenticateRequest) SetVersion(version int16)
- type SASLAuthenticateResponse
- func (v *SASLAuthenticateResponse) AppendTo(dst []byte) []byte
- func (v *SASLAuthenticateResponse) Default()
- func (v *SASLAuthenticateResponse) GetVersion() int16
- func (v *SASLAuthenticateResponse) IsFlexible() bool
- func (*SASLAuthenticateResponse) Key() int16
- func (*SASLAuthenticateResponse) MaxVersion() int16
- func (v *SASLAuthenticateResponse) ReadFrom(src []byte) error
- func (v *SASLAuthenticateResponse) RequestKind() Request
- func (v *SASLAuthenticateResponse) SetVersion(version int16)
- type SASLHandshakeRequest
- func (v *SASLHandshakeRequest) AppendTo(dst []byte) []byte
- func (v *SASLHandshakeRequest) Default()
- func (v *SASLHandshakeRequest) GetVersion() int16
- func (v *SASLHandshakeRequest) IsFlexible() bool
- func (*SASLHandshakeRequest) Key() int16
- func (*SASLHandshakeRequest) MaxVersion() int16
- func (v *SASLHandshakeRequest) ReadFrom(src []byte) error
- func (v *SASLHandshakeRequest) RequestWith(ctx context.Context, r Requestor) (*SASLHandshakeResponse, error)
- func (v *SASLHandshakeRequest) ResponseKind() Response
- func (v *SASLHandshakeRequest) SetVersion(version int16)
- type SASLHandshakeResponse
- func (v *SASLHandshakeResponse) AppendTo(dst []byte) []byte
- func (v *SASLHandshakeResponse) Default()
- func (v *SASLHandshakeResponse) GetVersion() int16
- func (v *SASLHandshakeResponse) IsFlexible() bool
- func (*SASLHandshakeResponse) Key() int16
- func (*SASLHandshakeResponse) MaxVersion() int16
- func (v *SASLHandshakeResponse) ReadFrom(src []byte) error
- func (v *SASLHandshakeResponse) RequestKind() Request
- func (v *SASLHandshakeResponse) SetVersion(version int16)
- type StickyMemberMetadata
- type StickyMemberMetadataCurrentAssignment
- type StopReplicaRequest
- func (v *StopReplicaRequest) AppendTo(dst []byte) []byte
- func (v *StopReplicaRequest) Default()
- func (v *StopReplicaRequest) GetVersion() int16
- func (v *StopReplicaRequest) IsFlexible() bool
- func (*StopReplicaRequest) Key() int16
- func (*StopReplicaRequest) MaxVersion() int16
- func (v *StopReplicaRequest) ReadFrom(src []byte) error
- func (v *StopReplicaRequest) RequestWith(ctx context.Context, r Requestor) (*StopReplicaResponse, error)
- func (v *StopReplicaRequest) ResponseKind() Response
- func (v *StopReplicaRequest) SetVersion(version int16)
- type StopReplicaRequestTopic
- type StopReplicaRequestTopicPartitionState
- type StopReplicaResponse
- func (v *StopReplicaResponse) AppendTo(dst []byte) []byte
- func (v *StopReplicaResponse) Default()
- func (v *StopReplicaResponse) GetVersion() int16
- func (v *StopReplicaResponse) IsFlexible() bool
- func (*StopReplicaResponse) Key() int16
- func (*StopReplicaResponse) MaxVersion() int16
- func (v *StopReplicaResponse) ReadFrom(src []byte) error
- func (v *StopReplicaResponse) RequestKind() Request
- func (v *StopReplicaResponse) SetVersion(version int16)
- type StopReplicaResponsePartition
- type SyncGroupRequest
- func (v *SyncGroupRequest) AppendTo(dst []byte) []byte
- func (v *SyncGroupRequest) Default()
- func (v *SyncGroupRequest) GetVersion() int16
- func (v *SyncGroupRequest) IsFlexible() bool
- func (v *SyncGroupRequest) IsGroupCoordinatorRequest()
- func (*SyncGroupRequest) Key() int16
- func (*SyncGroupRequest) MaxVersion() int16
- func (v *SyncGroupRequest) ReadFrom(src []byte) error
- func (v *SyncGroupRequest) RequestWith(ctx context.Context, r Requestor) (*SyncGroupResponse, error)
- func (v *SyncGroupRequest) ResponseKind() Response
- func (v *SyncGroupRequest) SetVersion(version int16)
- type SyncGroupRequestGroupAssignment
- type SyncGroupResponse
- func (v *SyncGroupResponse) AppendTo(dst []byte) []byte
- func (v *SyncGroupResponse) Default()
- func (v *SyncGroupResponse) GetVersion() int16
- func (v *SyncGroupResponse) IsFlexible() bool
- func (*SyncGroupResponse) Key() int16
- func (*SyncGroupResponse) MaxVersion() int16
- func (v *SyncGroupResponse) ReadFrom(src []byte) error
- func (v *SyncGroupResponse) RequestKind() Request
- func (v *SyncGroupResponse) SetVersion(version int16)
- func (v *SyncGroupResponse) Throttle() (int32, bool)
- type ThrottleResponse
- type TransactionState
- type TxnCoordinatorRequest
- type TxnMetadataKey
- type TxnMetadataValue
- type TxnMetadataValueTopic
- type TxnOffsetCommitRequest
- func (v *TxnOffsetCommitRequest) AppendTo(dst []byte) []byte
- func (v *TxnOffsetCommitRequest) Default()
- func (v *TxnOffsetCommitRequest) GetVersion() int16
- func (v *TxnOffsetCommitRequest) IsFlexible() bool
- func (v *TxnOffsetCommitRequest) IsGroupCoordinatorRequest()
- func (*TxnOffsetCommitRequest) Key() int16
- func (*TxnOffsetCommitRequest) MaxVersion() int16
- func (v *TxnOffsetCommitRequest) ReadFrom(src []byte) error
- func (v *TxnOffsetCommitRequest) RequestWith(ctx context.Context, r Requestor) (*TxnOffsetCommitResponse, error)
- func (v *TxnOffsetCommitRequest) ResponseKind() Response
- func (v *TxnOffsetCommitRequest) SetVersion(version int16)
- type TxnOffsetCommitRequestTopic
- type TxnOffsetCommitRequestTopicPartition
- type TxnOffsetCommitResponse
- func (v *TxnOffsetCommitResponse) AppendTo(dst []byte) []byte
- func (v *TxnOffsetCommitResponse) Default()
- func (v *TxnOffsetCommitResponse) GetVersion() int16
- func (v *TxnOffsetCommitResponse) IsFlexible() bool
- func (*TxnOffsetCommitResponse) Key() int16
- func (*TxnOffsetCommitResponse) MaxVersion() int16
- func (v *TxnOffsetCommitResponse) ReadFrom(src []byte) error
- func (v *TxnOffsetCommitResponse) RequestKind() Request
- func (v *TxnOffsetCommitResponse) SetVersion(version int16)
- func (v *TxnOffsetCommitResponse) Throttle() (int32, bool)
- type TxnOffsetCommitResponseTopic
- type TxnOffsetCommitResponseTopicPartition
- type UnregisterBrokerRequest
- func (v *UnregisterBrokerRequest) AppendTo(dst []byte) []byte
- func (v *UnregisterBrokerRequest) Default()
- func (v *UnregisterBrokerRequest) GetVersion() int16
- func (v *UnregisterBrokerRequest) IsFlexible() bool
- func (*UnregisterBrokerRequest) Key() int16
- func (*UnregisterBrokerRequest) MaxVersion() int16
- func (v *UnregisterBrokerRequest) ReadFrom(src []byte) error
- func (v *UnregisterBrokerRequest) RequestWith(ctx context.Context, r Requestor) (*UnregisterBrokerResponse, error)
- func (v *UnregisterBrokerRequest) ResponseKind() Response
- func (v *UnregisterBrokerRequest) SetVersion(version int16)
- type UnregisterBrokerResponse
- func (v *UnregisterBrokerResponse) AppendTo(dst []byte) []byte
- func (v *UnregisterBrokerResponse) Default()
- func (v *UnregisterBrokerResponse) GetVersion() int16
- func (v *UnregisterBrokerResponse) IsFlexible() bool
- func (*UnregisterBrokerResponse) Key() int16
- func (*UnregisterBrokerResponse) MaxVersion() int16
- func (v *UnregisterBrokerResponse) ReadFrom(src []byte) error
- func (v *UnregisterBrokerResponse) RequestKind() Request
- func (v *UnregisterBrokerResponse) SetVersion(version int16)
- func (v *UnregisterBrokerResponse) Throttle() (int32, bool)
- type UpdateFeaturesRequest
- func (v *UpdateFeaturesRequest) AppendTo(dst []byte) []byte
- func (v *UpdateFeaturesRequest) Default()
- func (v *UpdateFeaturesRequest) GetVersion() int16
- func (v *UpdateFeaturesRequest) IsAdminRequest()
- func (v *UpdateFeaturesRequest) IsFlexible() bool
- func (*UpdateFeaturesRequest) Key() int16
- func (*UpdateFeaturesRequest) MaxVersion() int16
- func (v *UpdateFeaturesRequest) ReadFrom(src []byte) error
- func (v *UpdateFeaturesRequest) RequestWith(ctx context.Context, r Requestor) (*UpdateFeaturesResponse, error)
- func (v *UpdateFeaturesRequest) ResponseKind() Response
- func (v *UpdateFeaturesRequest) SetVersion(version int16)
- type UpdateFeaturesRequestFeatureUpdate
- type UpdateFeaturesResponse
- func (v *UpdateFeaturesResponse) AppendTo(dst []byte) []byte
- func (v *UpdateFeaturesResponse) Default()
- func (v *UpdateFeaturesResponse) GetVersion() int16
- func (v *UpdateFeaturesResponse) IsFlexible() bool
- func (*UpdateFeaturesResponse) Key() int16
- func (*UpdateFeaturesResponse) MaxVersion() int16
- func (v *UpdateFeaturesResponse) ReadFrom(src []byte) error
- func (v *UpdateFeaturesResponse) RequestKind() Request
- func (v *UpdateFeaturesResponse) SetVersion(version int16)
- func (v *UpdateFeaturesResponse) Throttle() (int32, bool)
- type UpdateFeaturesResponseResult
- type UpdateMetadataRequest
- func (v *UpdateMetadataRequest) AppendTo(dst []byte) []byte
- func (v *UpdateMetadataRequest) Default()
- func (v *UpdateMetadataRequest) GetVersion() int16
- func (v *UpdateMetadataRequest) IsFlexible() bool
- func (*UpdateMetadataRequest) Key() int16
- func (*UpdateMetadataRequest) MaxVersion() int16
- func (v *UpdateMetadataRequest) ReadFrom(src []byte) error
- func (v *UpdateMetadataRequest) RequestWith(ctx context.Context, r Requestor) (*UpdateMetadataResponse, error)
- func (v *UpdateMetadataRequest) ResponseKind() Response
- func (v *UpdateMetadataRequest) SetVersion(version int16)
- type UpdateMetadataRequestLiveBroker
- type UpdateMetadataRequestLiveBrokerEndpoint
- type UpdateMetadataRequestTopicPartition
- type UpdateMetadataRequestTopicState
- type UpdateMetadataResponse
- func (v *UpdateMetadataResponse) AppendTo(dst []byte) []byte
- func (v *UpdateMetadataResponse) Default()
- func (v *UpdateMetadataResponse) GetVersion() int16
- func (v *UpdateMetadataResponse) IsFlexible() bool
- func (*UpdateMetadataResponse) Key() int16
- func (*UpdateMetadataResponse) MaxVersion() int16
- func (v *UpdateMetadataResponse) ReadFrom(src []byte) error
- func (v *UpdateMetadataResponse) RequestKind() Request
- func (v *UpdateMetadataResponse) SetVersion(version int16)
- type VoteRequest
- func (v *VoteRequest) AppendTo(dst []byte) []byte
- func (v *VoteRequest) Default()
- func (v *VoteRequest) GetVersion() int16
- func (v *VoteRequest) IsAdminRequest()
- func (v *VoteRequest) IsFlexible() bool
- func (*VoteRequest) Key() int16
- func (*VoteRequest) MaxVersion() int16
- func (v *VoteRequest) ReadFrom(src []byte) error
- func (v *VoteRequest) RequestWith(ctx context.Context, r Requestor) (*VoteResponse, error)
- func (v *VoteRequest) ResponseKind() Response
- func (v *VoteRequest) SetVersion(version int16)
- type VoteRequestTopic
- type VoteRequestTopicPartition
- type VoteResponse
- func (v *VoteResponse) AppendTo(dst []byte) []byte
- func (v *VoteResponse) Default()
- func (v *VoteResponse) GetVersion() int16
- func (v *VoteResponse) IsFlexible() bool
- func (*VoteResponse) Key() int16
- func (*VoteResponse) MaxVersion() int16
- func (v *VoteResponse) ReadFrom(src []byte) error
- func (v *VoteResponse) RequestKind() Request
- func (v *VoteResponse) SetVersion(version int16)
- type VoteResponseTopic
- type VoteResponseTopicPartition
- type WriteTxnMarkersRequest
- func (v *WriteTxnMarkersRequest) AppendTo(dst []byte) []byte
- func (v *WriteTxnMarkersRequest) Default()
- func (v *WriteTxnMarkersRequest) GetVersion() int16
- func (v *WriteTxnMarkersRequest) IsFlexible() bool
- func (*WriteTxnMarkersRequest) Key() int16
- func (*WriteTxnMarkersRequest) MaxVersion() int16
- func (v *WriteTxnMarkersRequest) ReadFrom(src []byte) error
- func (v *WriteTxnMarkersRequest) RequestWith(ctx context.Context, r Requestor) (*WriteTxnMarkersResponse, error)
- func (v *WriteTxnMarkersRequest) ResponseKind() Response
- func (v *WriteTxnMarkersRequest) SetVersion(version int16)
- type WriteTxnMarkersRequestMarker
- type WriteTxnMarkersRequestMarkerTopic
- type WriteTxnMarkersResponse
- func (v *WriteTxnMarkersResponse) AppendTo(dst []byte) []byte
- func (v *WriteTxnMarkersResponse) Default()
- func (v *WriteTxnMarkersResponse) GetVersion() int16
- func (v *WriteTxnMarkersResponse) IsFlexible() bool
- func (*WriteTxnMarkersResponse) Key() int16
- func (*WriteTxnMarkersResponse) MaxVersion() int16
- func (v *WriteTxnMarkersResponse) ReadFrom(src []byte) error
- func (v *WriteTxnMarkersResponse) RequestKind() Request
- func (v *WriteTxnMarkersResponse) SetVersion(version int16)
- type WriteTxnMarkersResponseMarker
- type WriteTxnMarkersResponseMarkerTopic
- type WriteTxnMarkersResponseMarkerTopicPartition
Constants ¶
const MaxKey = 66
MaxKey is the maximum key used for any messages in this package. Note that this value will change as Kafka adds more messages.
Variables ¶
This section is empty.
Functions ¶
func NameForKey ¶
NameForKey returns the name (e.g., "Fetch") corresponding to a given request key or "" if the key is unknown.
Types ¶
type ACLOperation ¶
type ACLOperation int8
An ACL operation.
Possible values and their meanings:
* 1 (ANY) Matches anything.
* 2 (ALL) Matches anything granted all permissions.
* 3 (READ)
* 4 (WRITE)
* 5 (CREATE)
* 6 (DELETE)
* 7 (ALTER)
* 8 (DESCRIBE)
* 9 (CLUSTER_ACTION)
* 10 (DESCRIBE_CONFIGS)
* 11 (ALTER_CONFIGS)
* 12 (IDEMPOTENT_WRITE)
const ( ACLOperationUnknown ACLOperation = 0 ACLOperationAny ACLOperation = 1 ACLOperationAll ACLOperation = 2 ACLOperationRead ACLOperation = 3 ACLOperationWrite ACLOperation = 4 ACLOperationCreate ACLOperation = 5 ACLOperationDelete ACLOperation = 6 ACLOperationAlter ACLOperation = 7 ACLOperationDescribe ACLOperation = 8 ACLOperationClusterAction ACLOperation = 9 ACLOperationDescribeConfigs ACLOperation = 10 ACLOperationAlterConfigs ACLOperation = 11 ACLOperationIdempotentWrite ACLOperation = 12 )
func (ACLOperation) String ¶
func (v ACLOperation) String() string
type ACLPermissionType ¶
type ACLPermissionType int8
An ACL permission type.
Possible values and their meanings:
* 1 (ANY) Any permission.
* 2 (DENY) Any deny permission.
* 3 (ALLOW) Any allow permission.
const ( ACLPermissionTypeUnknown ACLPermissionType = 0 ACLPermissionTypeAny ACLPermissionType = 1 ACLPermissionTypeDeny ACLPermissionType = 2 ACLPermissionTypeAllow ACLPermissionType = 3 )
func (ACLPermissionType) String ¶
func (v ACLPermissionType) String() string
type ACLResourcePatternType ¶
type ACLResourcePatternType int8
ACLResourcePatternType is how an acl's ResourceName is understood.
This field was added with Kafka 2.0.0 for KIP-290.
Possible values and their meanings:
* 1 (MATCH) Matches anything.
* 2 (LITERAL) The name must be an exact match.
* 3 (PREFIXED) The name must have our requested name as a prefix (that is, "foo" will match on "foobar").
const ( ACLResourcePatternTypeUnknown ACLResourcePatternType = 0 ACLResourcePatternTypeMatch ACLResourcePatternType = 1 ACLResourcePatternTypeLiteral ACLResourcePatternType = 2 ACLResourcePatternTypePrefixed ACLResourcePatternType = 3 )
func (ACLResourcePatternType) String ¶
func (v ACLResourcePatternType) String() string
type ACLResourceType ¶
type ACLResourceType int8
ACLResourceType is a type of resource to use for ACLs.
Possible values and their meanings:
* 1 (ANY)
* 2 (TOPIC)
* 3 (GROUP)
* 4 (CLUSTER)
* 5 (TRANSACTIONAL_ID)
* 6 (DELEGATION_TOKEN)
const ( ACLResourceTypeUnknown ACLResourceType = 0 ACLResourceTypeAny ACLResourceType = 1 ACLResourceTypeTopic ACLResourceType = 2 ACLResourceTypeGroup ACLResourceType = 3 ACLResourceTypeCluster ACLResourceType = 4 ACLResourceTypeTransactionalId ACLResourceType = 5 ACLResourceTypeDelegationToken ACLResourceType = 6 )
func (ACLResourceType) String ¶
func (v ACLResourceType) String() string
type AddOffsetsToTxnRequest ¶
type AddOffsetsToTxnRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TransactionalID is the transactional ID to use for this request. TransactionalID string // ProducerID is the producer ID of the client for this transactional ID // as received from InitProducerID. ProducerID int64 // ProducerEpoch is the producer epoch of the client for this transactional ID // as received from InitProducerID. ProducerEpoch int16 // Group is the group to tie this transaction to. Group string }
AddOffsetsToTxnRequest is a request that ties produced records to what group is being consumed for the transaction.
This request must be called before TxnOffsetCommitRequest.
Internally, this request simply adds the __consumer_offsets topic as a partition for this transaction with AddPartitionsToTxn for the partition in that topic that contains the group.
func NewAddOffsetsToTxnRequest ¶
func NewAddOffsetsToTxnRequest() AddOffsetsToTxnRequest
NewAddOffsetsToTxnRequest returns a default AddOffsetsToTxnRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAddOffsetsToTxnRequest ¶
func NewPtrAddOffsetsToTxnRequest() *AddOffsetsToTxnRequest
NewPtrAddOffsetsToTxnRequest returns a pointer to a default AddOffsetsToTxnRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AddOffsetsToTxnRequest) AppendTo ¶
func (v *AddOffsetsToTxnRequest) AppendTo(dst []byte) []byte
func (*AddOffsetsToTxnRequest) Default ¶
func (v *AddOffsetsToTxnRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AddOffsetsToTxnRequest.
func (*AddOffsetsToTxnRequest) GetVersion ¶
func (v *AddOffsetsToTxnRequest) GetVersion() int16
func (*AddOffsetsToTxnRequest) IsFlexible ¶
func (v *AddOffsetsToTxnRequest) IsFlexible() bool
func (*AddOffsetsToTxnRequest) IsTxnCoordinatorRequest ¶
func (v *AddOffsetsToTxnRequest) IsTxnCoordinatorRequest()
func (*AddOffsetsToTxnRequest) Key ¶
func (*AddOffsetsToTxnRequest) Key() int16
func (*AddOffsetsToTxnRequest) MaxVersion ¶
func (*AddOffsetsToTxnRequest) MaxVersion() int16
func (*AddOffsetsToTxnRequest) ReadFrom ¶
func (v *AddOffsetsToTxnRequest) ReadFrom(src []byte) error
func (*AddOffsetsToTxnRequest) RequestWith ¶
func (v *AddOffsetsToTxnRequest) RequestWith(ctx context.Context, r Requestor) (*AddOffsetsToTxnResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*AddOffsetsToTxnRequest) ResponseKind ¶
func (v *AddOffsetsToTxnRequest) ResponseKind() Response
func (*AddOffsetsToTxnRequest) SetVersion ¶
func (v *AddOffsetsToTxnRequest) SetVersion(version int16)
type AddOffsetsToTxnResponse ¶
type AddOffsetsToTxnResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // ErrorCode is any error for this topic/partition commit. // // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned if the client is // not authorized for write with transactional IDs with the requested // transactional ID. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to read group with the requested group id. // // This also can return any error that AddPartitionsToTxn returns. ErrorCode int16 }
AddOffsetsToTxnResponse is a response to an AddOffsetsToTxnRequest.
func NewAddOffsetsToTxnResponse ¶
func NewAddOffsetsToTxnResponse() AddOffsetsToTxnResponse
NewAddOffsetsToTxnResponse returns a default AddOffsetsToTxnResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAddOffsetsToTxnResponse ¶
func NewPtrAddOffsetsToTxnResponse() *AddOffsetsToTxnResponse
NewPtrAddOffsetsToTxnResponse returns a pointer to a default AddOffsetsToTxnResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AddOffsetsToTxnResponse) AppendTo ¶
func (v *AddOffsetsToTxnResponse) AppendTo(dst []byte) []byte
func (*AddOffsetsToTxnResponse) Default ¶
func (v *AddOffsetsToTxnResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AddOffsetsToTxnResponse.
func (*AddOffsetsToTxnResponse) GetVersion ¶
func (v *AddOffsetsToTxnResponse) GetVersion() int16
func (*AddOffsetsToTxnResponse) IsFlexible ¶
func (v *AddOffsetsToTxnResponse) IsFlexible() bool
func (*AddOffsetsToTxnResponse) Key ¶
func (*AddOffsetsToTxnResponse) Key() int16
func (*AddOffsetsToTxnResponse) MaxVersion ¶
func (*AddOffsetsToTxnResponse) MaxVersion() int16
func (*AddOffsetsToTxnResponse) ReadFrom ¶
func (v *AddOffsetsToTxnResponse) ReadFrom(src []byte) error
func (*AddOffsetsToTxnResponse) RequestKind ¶
func (v *AddOffsetsToTxnResponse) RequestKind() Request
func (*AddOffsetsToTxnResponse) SetVersion ¶
func (v *AddOffsetsToTxnResponse) SetVersion(version int16)
func (*AddOffsetsToTxnResponse) Throttle ¶ added in v0.6.2
func (v *AddOffsetsToTxnResponse) Throttle() (int32, bool)
type AddPartitionsToTxnRequest ¶
type AddPartitionsToTxnRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TransactionalID is the transactional ID to use for this request. TransactionalID string // ProducerID is the producer ID of the client for this transactional ID // as received from InitProducerID. ProducerID int64 // ProducerEpoch is the producer epoch of the client for this transactional ID // as received from InitProducerID. ProducerEpoch int16 // Topics are topics to add as part of the producer side of a transaction. Topics []AddPartitionsToTxnRequestTopic }
AddPartitionsToTxnRequest begins the producer side of a transaction for all partitions in the request. Before producing any records to a partition in the transaction, that partition must have been added to the transaction with this request.
func NewAddPartitionsToTxnRequest ¶
func NewAddPartitionsToTxnRequest() AddPartitionsToTxnRequest
NewAddPartitionsToTxnRequest returns a default AddPartitionsToTxnRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAddPartitionsToTxnRequest ¶
func NewPtrAddPartitionsToTxnRequest() *AddPartitionsToTxnRequest
NewPtrAddPartitionsToTxnRequest returns a pointer to a default AddPartitionsToTxnRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AddPartitionsToTxnRequest) AppendTo ¶
func (v *AddPartitionsToTxnRequest) AppendTo(dst []byte) []byte
func (*AddPartitionsToTxnRequest) Default ¶
func (v *AddPartitionsToTxnRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AddPartitionsToTxnRequest.
func (*AddPartitionsToTxnRequest) GetVersion ¶
func (v *AddPartitionsToTxnRequest) GetVersion() int16
func (*AddPartitionsToTxnRequest) IsFlexible ¶
func (v *AddPartitionsToTxnRequest) IsFlexible() bool
func (*AddPartitionsToTxnRequest) IsTxnCoordinatorRequest ¶
func (v *AddPartitionsToTxnRequest) IsTxnCoordinatorRequest()
func (*AddPartitionsToTxnRequest) Key ¶
func (*AddPartitionsToTxnRequest) Key() int16
func (*AddPartitionsToTxnRequest) MaxVersion ¶
func (*AddPartitionsToTxnRequest) MaxVersion() int16
func (*AddPartitionsToTxnRequest) ReadFrom ¶
func (v *AddPartitionsToTxnRequest) ReadFrom(src []byte) error
func (*AddPartitionsToTxnRequest) RequestWith ¶
func (v *AddPartitionsToTxnRequest) RequestWith(ctx context.Context, r Requestor) (*AddPartitionsToTxnResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*AddPartitionsToTxnRequest) ResponseKind ¶
func (v *AddPartitionsToTxnRequest) ResponseKind() Response
func (*AddPartitionsToTxnRequest) SetVersion ¶
func (v *AddPartitionsToTxnRequest) SetVersion(version int16)
type AddPartitionsToTxnRequestTopic ¶
type AddPartitionsToTxnRequestTopic struct { // Topic is a topic name. Topic string // Partitions are partitions within a topic to add as part of the producer // side of a transaction. Partitions []int32 }
func NewAddPartitionsToTxnRequestTopic ¶
func NewAddPartitionsToTxnRequestTopic() AddPartitionsToTxnRequestTopic
NewAddPartitionsToTxnRequestTopic returns a default AddPartitionsToTxnRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*AddPartitionsToTxnRequestTopic) Default ¶
func (v *AddPartitionsToTxnRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AddPartitionsToTxnRequestTopic.
type AddPartitionsToTxnResponse ¶
type AddPartitionsToTxnResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Topics are responses to topics in the request. Topics []AddPartitionsToTxnResponseTopic }
AddPartitionsToTxnResponse is a response to an AddPartitionsToTxnRequest.
func NewAddPartitionsToTxnResponse ¶
func NewAddPartitionsToTxnResponse() AddPartitionsToTxnResponse
NewAddPartitionsToTxnResponse returns a default AddPartitionsToTxnResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAddPartitionsToTxnResponse ¶
func NewPtrAddPartitionsToTxnResponse() *AddPartitionsToTxnResponse
NewPtrAddPartitionsToTxnResponse returns a pointer to a default AddPartitionsToTxnResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AddPartitionsToTxnResponse) AppendTo ¶
func (v *AddPartitionsToTxnResponse) AppendTo(dst []byte) []byte
func (*AddPartitionsToTxnResponse) Default ¶
func (v *AddPartitionsToTxnResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AddPartitionsToTxnResponse.
func (*AddPartitionsToTxnResponse) GetVersion ¶
func (v *AddPartitionsToTxnResponse) GetVersion() int16
func (*AddPartitionsToTxnResponse) IsFlexible ¶
func (v *AddPartitionsToTxnResponse) IsFlexible() bool
func (*AddPartitionsToTxnResponse) Key ¶
func (*AddPartitionsToTxnResponse) Key() int16
func (*AddPartitionsToTxnResponse) MaxVersion ¶
func (*AddPartitionsToTxnResponse) MaxVersion() int16
func (*AddPartitionsToTxnResponse) ReadFrom ¶
func (v *AddPartitionsToTxnResponse) ReadFrom(src []byte) error
func (*AddPartitionsToTxnResponse) RequestKind ¶
func (v *AddPartitionsToTxnResponse) RequestKind() Request
func (*AddPartitionsToTxnResponse) SetVersion ¶
func (v *AddPartitionsToTxnResponse) SetVersion(version int16)
func (*AddPartitionsToTxnResponse) Throttle ¶ added in v0.6.2
func (v *AddPartitionsToTxnResponse) Throttle() (int32, bool)
type AddPartitionsToTxnResponseTopic ¶
type AddPartitionsToTxnResponseTopic struct { // Topic is a topic being responded to. Topic string // Partitions are responses to partitions in the request. Partitions []AddPartitionsToTxnResponseTopicPartition }
func NewAddPartitionsToTxnResponseTopic ¶
func NewAddPartitionsToTxnResponseTopic() AddPartitionsToTxnResponseTopic
NewAddPartitionsToTxnResponseTopic returns a default AddPartitionsToTxnResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*AddPartitionsToTxnResponseTopic) Default ¶
func (v *AddPartitionsToTxnResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AddPartitionsToTxnResponseTopic.
type AddPartitionsToTxnResponseTopicPartition ¶
type AddPartitionsToTxnResponseTopicPartition struct { // Partition is a partition being responded to. Partition int32 // ErrorCode is any error for this topic/partition commit. // // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned if the client is // not authorized for write with transactional IDs with the requested // transactional ID. // // TOPIC_AUTHORIZATION_FAILED is returned for all topics that the client // is not authorized to write to. // // UNKNOWN_TOPIC_OR_PARTITION is returned for all topics or partitions // that the broker does not know of. // // OPERATION_NOT_ATTEMPTED is returned if any of the above errors occur // for all partitions that did not have the above errors. // // INVALID_REQUEST is returned if the transactional ID is invalid. // // COORDINATOR_LOAD_IN_PROGRESS is returned if the coordinator for this // transactional ID is still loading. // // NOT_COORDINATOR is returned if the broker is not the coordinator for // this transactional ID. // // INVALID_PRODUCER_ID_MAPPING is returned if the produce request used // a producer ID that is not tied to the transactional ID (i.e., mismatch // from what was returned from InitProducerID). // // INVALID_PRODUCER_EPOCH is returned if the requested epoch does not match // the broker epoch for this transactional ID. // // CONCURRENT_TRANSACTIONS is returned if there is an ongoing transaction for // this transactional ID, if the producer ID and epoch matches the broker's. ErrorCode int16 }
func NewAddPartitionsToTxnResponseTopicPartition ¶
func NewAddPartitionsToTxnResponseTopicPartition() AddPartitionsToTxnResponseTopicPartition
NewAddPartitionsToTxnResponseTopicPartition returns a default AddPartitionsToTxnResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*AddPartitionsToTxnResponseTopicPartition) Default ¶
func (v *AddPartitionsToTxnResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AddPartitionsToTxnResponseTopicPartition.
type AdminRequest ¶
type AdminRequest interface { // IsAdminRequest is a method attached to requests that must be // issed to Kafka controllers. IsAdminRequest() Request }
AdminRequest represents a request that must be issued to Kafka controllers.
type AlterClientQuotasRequest ¶
type AlterClientQuotasRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Entries are quota configuration entries to alter. Entries []AlterClientQuotasRequestEntry // ValidateOnly is makes this request a dry-run; the alteration is validated // but not performed. ValidateOnly bool }
AlterClientQuotaRequest, proposed in KIP-546 and introduced with Kafka 2.6.0, provides a way to alter client quotas.
func NewAlterClientQuotasRequest ¶
func NewAlterClientQuotasRequest() AlterClientQuotasRequest
NewAlterClientQuotasRequest returns a default AlterClientQuotasRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterClientQuotasRequest ¶
func NewPtrAlterClientQuotasRequest() *AlterClientQuotasRequest
NewPtrAlterClientQuotasRequest returns a pointer to a default AlterClientQuotasRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterClientQuotasRequest) AppendTo ¶
func (v *AlterClientQuotasRequest) AppendTo(dst []byte) []byte
func (*AlterClientQuotasRequest) Default ¶
func (v *AlterClientQuotasRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterClientQuotasRequest.
func (*AlterClientQuotasRequest) GetVersion ¶
func (v *AlterClientQuotasRequest) GetVersion() int16
func (*AlterClientQuotasRequest) IsFlexible ¶
func (v *AlterClientQuotasRequest) IsFlexible() bool
func (*AlterClientQuotasRequest) Key ¶
func (*AlterClientQuotasRequest) Key() int16
func (*AlterClientQuotasRequest) MaxVersion ¶
func (*AlterClientQuotasRequest) MaxVersion() int16
func (*AlterClientQuotasRequest) ReadFrom ¶
func (v *AlterClientQuotasRequest) ReadFrom(src []byte) error
func (*AlterClientQuotasRequest) RequestWith ¶
func (v *AlterClientQuotasRequest) RequestWith(ctx context.Context, r Requestor) (*AlterClientQuotasResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*AlterClientQuotasRequest) ResponseKind ¶
func (v *AlterClientQuotasRequest) ResponseKind() Response
func (*AlterClientQuotasRequest) SetVersion ¶
func (v *AlterClientQuotasRequest) SetVersion(version int16)
type AlterClientQuotasRequestEntry ¶
type AlterClientQuotasRequestEntry struct { // Entity contains the components of a quota entity to alter. Entity []AlterClientQuotasRequestEntryEntity // Ops contains quota configuration entries to alter. Ops []AlterClientQuotasRequestEntryOp }
func NewAlterClientQuotasRequestEntry ¶
func NewAlterClientQuotasRequestEntry() AlterClientQuotasRequestEntry
NewAlterClientQuotasRequestEntry returns a default AlterClientQuotasRequestEntry This is a shortcut for creating a struct and calling Default yourself.
func (*AlterClientQuotasRequestEntry) Default ¶
func (v *AlterClientQuotasRequestEntry) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterClientQuotasRequestEntry.
type AlterClientQuotasRequestEntryEntity ¶
type AlterClientQuotasRequestEntryEntity struct { // Type is the entity component's type; e.g. "client-id" or "user". Type string // Name is the name of the entity, or null for the default. Name *string }
func NewAlterClientQuotasRequestEntryEntity ¶
func NewAlterClientQuotasRequestEntryEntity() AlterClientQuotasRequestEntryEntity
NewAlterClientQuotasRequestEntryEntity returns a default AlterClientQuotasRequestEntryEntity This is a shortcut for creating a struct and calling Default yourself.
func (*AlterClientQuotasRequestEntryEntity) Default ¶
func (v *AlterClientQuotasRequestEntryEntity) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterClientQuotasRequestEntryEntity.
type AlterClientQuotasRequestEntryOp ¶
type AlterClientQuotasRequestEntryOp struct { // Key is the quota configuration key to alter. Key string // Value is the value to set; ignored if remove is true. Value float64 // Remove is whether the quota configuration value should be removed or set. Remove bool }
func NewAlterClientQuotasRequestEntryOp ¶
func NewAlterClientQuotasRequestEntryOp() AlterClientQuotasRequestEntryOp
NewAlterClientQuotasRequestEntryOp returns a default AlterClientQuotasRequestEntryOp This is a shortcut for creating a struct and calling Default yourself.
func (*AlterClientQuotasRequestEntryOp) Default ¶
func (v *AlterClientQuotasRequestEntryOp) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterClientQuotasRequestEntryOp.
type AlterClientQuotasResponse ¶
type AlterClientQuotasResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // Entries contains results for the alter request. Entries []AlterClientQuotasResponseEntry }
AlterClientQuotasResponse is a response to an AlterClientQuotasRequest.
func NewAlterClientQuotasResponse ¶
func NewAlterClientQuotasResponse() AlterClientQuotasResponse
NewAlterClientQuotasResponse returns a default AlterClientQuotasResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterClientQuotasResponse ¶
func NewPtrAlterClientQuotasResponse() *AlterClientQuotasResponse
NewPtrAlterClientQuotasResponse returns a pointer to a default AlterClientQuotasResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterClientQuotasResponse) AppendTo ¶
func (v *AlterClientQuotasResponse) AppendTo(dst []byte) []byte
func (*AlterClientQuotasResponse) Default ¶
func (v *AlterClientQuotasResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterClientQuotasResponse.
func (*AlterClientQuotasResponse) GetVersion ¶
func (v *AlterClientQuotasResponse) GetVersion() int16
func (*AlterClientQuotasResponse) IsFlexible ¶
func (v *AlterClientQuotasResponse) IsFlexible() bool
func (*AlterClientQuotasResponse) Key ¶
func (*AlterClientQuotasResponse) Key() int16
func (*AlterClientQuotasResponse) MaxVersion ¶
func (*AlterClientQuotasResponse) MaxVersion() int16
func (*AlterClientQuotasResponse) ReadFrom ¶
func (v *AlterClientQuotasResponse) ReadFrom(src []byte) error
func (*AlterClientQuotasResponse) RequestKind ¶
func (v *AlterClientQuotasResponse) RequestKind() Request
func (*AlterClientQuotasResponse) SetVersion ¶
func (v *AlterClientQuotasResponse) SetVersion(version int16)
func (*AlterClientQuotasResponse) Throttle ¶ added in v0.6.2
func (v *AlterClientQuotasResponse) Throttle() (int32, bool)
type AlterClientQuotasResponseEntry ¶
type AlterClientQuotasResponseEntry struct { // ErrorCode is the error code for an alter on a matched entity. ErrorCode int16 // ErrorMessage is an informative message if the alter on this entity failed. ErrorMessage *string // Entity contains the components of a matched entity. Entity []AlterClientQuotasResponseEntryEntity }
func NewAlterClientQuotasResponseEntry ¶
func NewAlterClientQuotasResponseEntry() AlterClientQuotasResponseEntry
NewAlterClientQuotasResponseEntry returns a default AlterClientQuotasResponseEntry This is a shortcut for creating a struct and calling Default yourself.
func (*AlterClientQuotasResponseEntry) Default ¶
func (v *AlterClientQuotasResponseEntry) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterClientQuotasResponseEntry.
type AlterClientQuotasResponseEntryEntity ¶
type AlterClientQuotasResponseEntryEntity struct { // Type is the entity component's type; e.g. "client-id" or "user". Type string // Name is the name of the entity, or null for the default. Name *string }
func NewAlterClientQuotasResponseEntryEntity ¶
func NewAlterClientQuotasResponseEntryEntity() AlterClientQuotasResponseEntryEntity
NewAlterClientQuotasResponseEntryEntity returns a default AlterClientQuotasResponseEntryEntity This is a shortcut for creating a struct and calling Default yourself.
func (*AlterClientQuotasResponseEntryEntity) Default ¶
func (v *AlterClientQuotasResponseEntryEntity) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterClientQuotasResponseEntryEntity.
type AlterConfigsRequest ¶
type AlterConfigsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Resources is an array of configs to alter. Resources []AlterConfigsRequestResource // ValidateOnly validates the request but does not apply it. ValidateOnly bool }
AlterConfigsRequest issues a request to alter either topic or broker configs.
Note that to alter configs, you must specify the whole config on every request. All existing non-static values will be removed. This means that to add one key/value to a config, you must describe the config and then issue an alter request with the current config with the new key value. This also means that dynamic sensitive values, which are not returned in describe configs, will be lost.
To fix this problem, the AlterConfigs request / response was deprecated in Kafka 2.3.0 in favor of the new IncrementalAlterConfigs request / response. See KIP-339 for more details.
func NewAlterConfigsRequest ¶
func NewAlterConfigsRequest() AlterConfigsRequest
NewAlterConfigsRequest returns a default AlterConfigsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterConfigsRequest ¶
func NewPtrAlterConfigsRequest() *AlterConfigsRequest
NewPtrAlterConfigsRequest returns a pointer to a default AlterConfigsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterConfigsRequest) AppendTo ¶
func (v *AlterConfigsRequest) AppendTo(dst []byte) []byte
func (*AlterConfigsRequest) Default ¶
func (v *AlterConfigsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterConfigsRequest.
func (*AlterConfigsRequest) GetVersion ¶
func (v *AlterConfigsRequest) GetVersion() int16
func (*AlterConfigsRequest) IsFlexible ¶
func (v *AlterConfigsRequest) IsFlexible() bool
func (*AlterConfigsRequest) Key ¶
func (*AlterConfigsRequest) Key() int16
func (*AlterConfigsRequest) MaxVersion ¶
func (*AlterConfigsRequest) MaxVersion() int16
func (*AlterConfigsRequest) ReadFrom ¶
func (v *AlterConfigsRequest) ReadFrom(src []byte) error
func (*AlterConfigsRequest) RequestWith ¶
func (v *AlterConfigsRequest) RequestWith(ctx context.Context, r Requestor) (*AlterConfigsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*AlterConfigsRequest) ResponseKind ¶
func (v *AlterConfigsRequest) ResponseKind() Response
func (*AlterConfigsRequest) SetVersion ¶
func (v *AlterConfigsRequest) SetVersion(version int16)
type AlterConfigsRequestResource ¶
type AlterConfigsRequestResource struct { // ResourceType is an enum corresponding to the type of config to alter. // The only two valid values are 2 (for topic) and 4 (for broker). ResourceType ConfigResourceType // ResourceName is the name of config to alter. // // If the requested type is a topic, this corresponds to a topic name. // // If the requested type if a broker, this should either be empty or be // the ID of the broker this request is issued to. If it is empty, this // updates all broker configs. If a specific ID, this updates just the // broker. Using a specific ID also ensures that brokers reload config // or secret files even if the file path has not changed. Lastly, password // config options can only be defined on a per broker basis. // // If the type is broker logger, this must be a broker ID. ResourceName string // Configs contains key/value config pairs to set on the resource. Configs []AlterConfigsRequestResourceConfig }
func NewAlterConfigsRequestResource ¶
func NewAlterConfigsRequestResource() AlterConfigsRequestResource
NewAlterConfigsRequestResource returns a default AlterConfigsRequestResource This is a shortcut for creating a struct and calling Default yourself.
func (*AlterConfigsRequestResource) Default ¶
func (v *AlterConfigsRequestResource) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterConfigsRequestResource.
type AlterConfigsRequestResourceConfig ¶
type AlterConfigsRequestResourceConfig struct { // Name is a key to set (e.g. segment.bytes). Name string // Value is a value to set for the key (e.g. 10). Value *string }
func NewAlterConfigsRequestResourceConfig ¶
func NewAlterConfigsRequestResourceConfig() AlterConfigsRequestResourceConfig
NewAlterConfigsRequestResourceConfig returns a default AlterConfigsRequestResourceConfig This is a shortcut for creating a struct and calling Default yourself.
func (*AlterConfigsRequestResourceConfig) Default ¶
func (v *AlterConfigsRequestResourceConfig) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterConfigsRequestResourceConfig.
type AlterConfigsResponse ¶
type AlterConfigsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Resources are responses for each resource in the alter request. Resources []AlterConfigsResponseResource }
AlterConfigsResponse is returned from an AlterConfigsRequest.
func NewAlterConfigsResponse ¶
func NewAlterConfigsResponse() AlterConfigsResponse
NewAlterConfigsResponse returns a default AlterConfigsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterConfigsResponse ¶
func NewPtrAlterConfigsResponse() *AlterConfigsResponse
NewPtrAlterConfigsResponse returns a pointer to a default AlterConfigsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterConfigsResponse) AppendTo ¶
func (v *AlterConfigsResponse) AppendTo(dst []byte) []byte
func (*AlterConfigsResponse) Default ¶
func (v *AlterConfigsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterConfigsResponse.
func (*AlterConfigsResponse) GetVersion ¶
func (v *AlterConfigsResponse) GetVersion() int16
func (*AlterConfigsResponse) IsFlexible ¶
func (v *AlterConfigsResponse) IsFlexible() bool
func (*AlterConfigsResponse) Key ¶
func (*AlterConfigsResponse) Key() int16
func (*AlterConfigsResponse) MaxVersion ¶
func (*AlterConfigsResponse) MaxVersion() int16
func (*AlterConfigsResponse) ReadFrom ¶
func (v *AlterConfigsResponse) ReadFrom(src []byte) error
func (*AlterConfigsResponse) RequestKind ¶
func (v *AlterConfigsResponse) RequestKind() Request
func (*AlterConfigsResponse) SetVersion ¶
func (v *AlterConfigsResponse) SetVersion(version int16)
func (*AlterConfigsResponse) Throttle ¶ added in v0.6.2
func (v *AlterConfigsResponse) Throttle() (int32, bool)
type AlterConfigsResponseResource ¶
type AlterConfigsResponseResource struct { // ErrorCode is the error code returned for altering configs. // // CLUSTER_AUTHORIZATION_FAILED is returned if asking to alter broker // configs but the client is not authorized to do so. // // TOPIC_AUTHORIZATION_FAILED is returned if asking to alter topic // configs but the client is not authorized to do so. // // INVALID_TOPIC_EXCEPTION is returned if the requested topic was invalid. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of // the requested topic. // // INVALID_REQUEST is returned if the requested config is invalid or if // asking Kafka to alter an invalid resource. ErrorCode int16 // ErrorMessage is an informative message if the alter config failed. ErrorMessage *string // ResourceType is the enum corresponding to the type of altered config. ResourceType ConfigResourceType // ResourceName is the name corresponding to the alter config request. ResourceName string }
func NewAlterConfigsResponseResource ¶
func NewAlterConfigsResponseResource() AlterConfigsResponseResource
NewAlterConfigsResponseResource returns a default AlterConfigsResponseResource This is a shortcut for creating a struct and calling Default yourself.
func (*AlterConfigsResponseResource) Default ¶
func (v *AlterConfigsResponseResource) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterConfigsResponseResource.
type AlterISRRequest ¶
type AlterISRRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The ID of the requesting broker. BrokerID int32 // The epoch of the requesting broker. BrokerEpoch int64 Topics []AlterISRRequestTopic }
AlterISRRequest, proposed in KIP-497 and introduced in Kafka 2.7.0, is an admin request to modify ISR.
func NewAlterISRRequest ¶
func NewAlterISRRequest() AlterISRRequest
NewAlterISRRequest returns a default AlterISRRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterISRRequest ¶
func NewPtrAlterISRRequest() *AlterISRRequest
NewPtrAlterISRRequest returns a pointer to a default AlterISRRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterISRRequest) AppendTo ¶
func (v *AlterISRRequest) AppendTo(dst []byte) []byte
func (*AlterISRRequest) Default ¶
func (v *AlterISRRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterISRRequest.
func (*AlterISRRequest) GetVersion ¶
func (v *AlterISRRequest) GetVersion() int16
func (*AlterISRRequest) IsAdminRequest ¶
func (v *AlterISRRequest) IsAdminRequest()
func (*AlterISRRequest) IsFlexible ¶
func (v *AlterISRRequest) IsFlexible() bool
func (*AlterISRRequest) Key ¶
func (*AlterISRRequest) Key() int16
func (*AlterISRRequest) MaxVersion ¶
func (*AlterISRRequest) MaxVersion() int16
func (*AlterISRRequest) ReadFrom ¶
func (v *AlterISRRequest) ReadFrom(src []byte) error
func (*AlterISRRequest) RequestWith ¶
func (v *AlterISRRequest) RequestWith(ctx context.Context, r Requestor) (*AlterISRResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*AlterISRRequest) ResponseKind ¶
func (v *AlterISRRequest) ResponseKind() Response
func (*AlterISRRequest) SetVersion ¶
func (v *AlterISRRequest) SetVersion(version int16)
type AlterISRRequestTopic ¶
type AlterISRRequestTopic struct { Topic string Partitions []AlterISRRequestTopicPartition }
func NewAlterISRRequestTopic ¶
func NewAlterISRRequestTopic() AlterISRRequestTopic
NewAlterISRRequestTopic returns a default AlterISRRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*AlterISRRequestTopic) Default ¶
func (v *AlterISRRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterISRRequestTopic.
type AlterISRRequestTopicPartition ¶
type AlterISRRequestTopicPartition struct { Partition int32 // The leader epoch of this partition. LeaderEpoch int32 // The ISR for this partition. NewISR []int32 // The expected version of ISR which is being updated. CurrentISRVersion int32 }
func NewAlterISRRequestTopicPartition ¶
func NewAlterISRRequestTopicPartition() AlterISRRequestTopicPartition
NewAlterISRRequestTopicPartition returns a default AlterISRRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*AlterISRRequestTopicPartition) Default ¶
func (v *AlterISRRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterISRRequestTopicPartition.
type AlterISRResponse ¶
type AlterISRResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 ErrorCode int16 Topics []AlterISRResponseTopic }
func NewAlterISRResponse ¶
func NewAlterISRResponse() AlterISRResponse
NewAlterISRResponse returns a default AlterISRResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterISRResponse ¶
func NewPtrAlterISRResponse() *AlterISRResponse
NewPtrAlterISRResponse returns a pointer to a default AlterISRResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterISRResponse) AppendTo ¶
func (v *AlterISRResponse) AppendTo(dst []byte) []byte
func (*AlterISRResponse) Default ¶
func (v *AlterISRResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterISRResponse.
func (*AlterISRResponse) GetVersion ¶
func (v *AlterISRResponse) GetVersion() int16
func (*AlterISRResponse) IsFlexible ¶
func (v *AlterISRResponse) IsFlexible() bool
func (*AlterISRResponse) Key ¶
func (*AlterISRResponse) Key() int16
func (*AlterISRResponse) MaxVersion ¶
func (*AlterISRResponse) MaxVersion() int16
func (*AlterISRResponse) ReadFrom ¶
func (v *AlterISRResponse) ReadFrom(src []byte) error
func (*AlterISRResponse) RequestKind ¶
func (v *AlterISRResponse) RequestKind() Request
func (*AlterISRResponse) SetVersion ¶
func (v *AlterISRResponse) SetVersion(version int16)
func (*AlterISRResponse) Throttle ¶ added in v0.6.2
func (v *AlterISRResponse) Throttle() (int32, bool)
type AlterISRResponseTopic ¶
type AlterISRResponseTopic struct { Topic string Partitions []AlterISRResponseTopicPartition }
func NewAlterISRResponseTopic ¶
func NewAlterISRResponseTopic() AlterISRResponseTopic
NewAlterISRResponseTopic returns a default AlterISRResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*AlterISRResponseTopic) Default ¶
func (v *AlterISRResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterISRResponseTopic.
type AlterISRResponseTopicPartition ¶
type AlterISRResponseTopicPartition struct { Partition int32 ErrorCode int16 // The broker ID of the leader. LeaderID int32 // The leader epoch of this partition. LeaderEpoch int32 // The in-sync replica ids. ISR []int32 // The current ISR version. CurrentISRVersion int32 }
func NewAlterISRResponseTopicPartition ¶
func NewAlterISRResponseTopicPartition() AlterISRResponseTopicPartition
NewAlterISRResponseTopicPartition returns a default AlterISRResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*AlterISRResponseTopicPartition) Default ¶
func (v *AlterISRResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterISRResponseTopicPartition.
type AlterPartitionAssignmentsRequest ¶
type AlterPartitionAssignmentsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TimeoutMillis is how long to wait for the response. TimeoutMillis int32 // Topics are topics for which to reassign partitions of. Topics []AlterPartitionAssignmentsRequestTopic }
AlterPartitionAssignmentsRequest, proposed in KIP-455 and implemented in Kafka 2.4.0, is a request to reassign partitions to certain brokers.
ACL wise, this requires ALTER on CLUSTER.
func NewAlterPartitionAssignmentsRequest ¶
func NewAlterPartitionAssignmentsRequest() AlterPartitionAssignmentsRequest
NewAlterPartitionAssignmentsRequest returns a default AlterPartitionAssignmentsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterPartitionAssignmentsRequest ¶
func NewPtrAlterPartitionAssignmentsRequest() *AlterPartitionAssignmentsRequest
NewPtrAlterPartitionAssignmentsRequest returns a pointer to a default AlterPartitionAssignmentsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterPartitionAssignmentsRequest) AppendTo ¶
func (v *AlterPartitionAssignmentsRequest) AppendTo(dst []byte) []byte
func (*AlterPartitionAssignmentsRequest) Default ¶
func (v *AlterPartitionAssignmentsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterPartitionAssignmentsRequest.
func (*AlterPartitionAssignmentsRequest) GetVersion ¶
func (v *AlterPartitionAssignmentsRequest) GetVersion() int16
func (*AlterPartitionAssignmentsRequest) IsAdminRequest ¶
func (v *AlterPartitionAssignmentsRequest) IsAdminRequest()
func (*AlterPartitionAssignmentsRequest) IsFlexible ¶
func (v *AlterPartitionAssignmentsRequest) IsFlexible() bool
func (*AlterPartitionAssignmentsRequest) Key ¶
func (*AlterPartitionAssignmentsRequest) Key() int16
func (*AlterPartitionAssignmentsRequest) MaxVersion ¶
func (*AlterPartitionAssignmentsRequest) MaxVersion() int16
func (*AlterPartitionAssignmentsRequest) ReadFrom ¶
func (v *AlterPartitionAssignmentsRequest) ReadFrom(src []byte) error
func (*AlterPartitionAssignmentsRequest) RequestWith ¶
func (v *AlterPartitionAssignmentsRequest) RequestWith(ctx context.Context, r Requestor) (*AlterPartitionAssignmentsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*AlterPartitionAssignmentsRequest) ResponseKind ¶
func (v *AlterPartitionAssignmentsRequest) ResponseKind() Response
func (*AlterPartitionAssignmentsRequest) SetVersion ¶
func (v *AlterPartitionAssignmentsRequest) SetVersion(version int16)
type AlterPartitionAssignmentsRequestTopic ¶
type AlterPartitionAssignmentsRequestTopic struct { // Topic is a topic to reassign the partitions of. Topic string // Partitions contains partitions to reassign. Partitions []AlterPartitionAssignmentsRequestTopicPartition }
func NewAlterPartitionAssignmentsRequestTopic ¶
func NewAlterPartitionAssignmentsRequestTopic() AlterPartitionAssignmentsRequestTopic
NewAlterPartitionAssignmentsRequestTopic returns a default AlterPartitionAssignmentsRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*AlterPartitionAssignmentsRequestTopic) Default ¶
func (v *AlterPartitionAssignmentsRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterPartitionAssignmentsRequestTopic.
type AlterPartitionAssignmentsRequestTopicPartition ¶
type AlterPartitionAssignmentsRequestTopicPartition struct { // Partition is a partition to reassign. Partition int32 // Replicas are replicas to place the partition on, or null to // cancel a pending reassignment of this partition. Replicas []int32 }
func NewAlterPartitionAssignmentsRequestTopicPartition ¶
func NewAlterPartitionAssignmentsRequestTopicPartition() AlterPartitionAssignmentsRequestTopicPartition
NewAlterPartitionAssignmentsRequestTopicPartition returns a default AlterPartitionAssignmentsRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*AlterPartitionAssignmentsRequestTopicPartition) Default ¶
func (v *AlterPartitionAssignmentsRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterPartitionAssignmentsRequestTopicPartition.
type AlterPartitionAssignmentsResponse ¶
type AlterPartitionAssignmentsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // ErrorCode is any global (applied to all partitions) error code. ErrorCode int16 // ErrorMessage is any global (applied to all partitions) error message. ErrorMessage *string // Topics contains responses for each topic requested. Topics []AlterPartitionAssignmentsResponseTopic }
AlterPartitionAssignmentsResponse is returned for an AlterPartitionAssignmentsRequest.
func NewAlterPartitionAssignmentsResponse ¶
func NewAlterPartitionAssignmentsResponse() AlterPartitionAssignmentsResponse
NewAlterPartitionAssignmentsResponse returns a default AlterPartitionAssignmentsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterPartitionAssignmentsResponse ¶
func NewPtrAlterPartitionAssignmentsResponse() *AlterPartitionAssignmentsResponse
NewPtrAlterPartitionAssignmentsResponse returns a pointer to a default AlterPartitionAssignmentsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterPartitionAssignmentsResponse) AppendTo ¶
func (v *AlterPartitionAssignmentsResponse) AppendTo(dst []byte) []byte
func (*AlterPartitionAssignmentsResponse) Default ¶
func (v *AlterPartitionAssignmentsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterPartitionAssignmentsResponse.
func (*AlterPartitionAssignmentsResponse) GetVersion ¶
func (v *AlterPartitionAssignmentsResponse) GetVersion() int16
func (*AlterPartitionAssignmentsResponse) IsFlexible ¶
func (v *AlterPartitionAssignmentsResponse) IsFlexible() bool
func (*AlterPartitionAssignmentsResponse) Key ¶
func (*AlterPartitionAssignmentsResponse) Key() int16
func (*AlterPartitionAssignmentsResponse) MaxVersion ¶
func (*AlterPartitionAssignmentsResponse) MaxVersion() int16
func (*AlterPartitionAssignmentsResponse) ReadFrom ¶
func (v *AlterPartitionAssignmentsResponse) ReadFrom(src []byte) error
func (*AlterPartitionAssignmentsResponse) RequestKind ¶
func (v *AlterPartitionAssignmentsResponse) RequestKind() Request
func (*AlterPartitionAssignmentsResponse) SetVersion ¶
func (v *AlterPartitionAssignmentsResponse) SetVersion(version int16)
func (*AlterPartitionAssignmentsResponse) Throttle ¶ added in v0.6.2
func (v *AlterPartitionAssignmentsResponse) Throttle() (int32, bool)
type AlterPartitionAssignmentsResponseTopic ¶
type AlterPartitionAssignmentsResponseTopic struct { // Topic is the topic being responded to. Topic string // Partitions contains responses for partitions. Partitions []AlterPartitionAssignmentsResponseTopicPartition }
func NewAlterPartitionAssignmentsResponseTopic ¶
func NewAlterPartitionAssignmentsResponseTopic() AlterPartitionAssignmentsResponseTopic
NewAlterPartitionAssignmentsResponseTopic returns a default AlterPartitionAssignmentsResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*AlterPartitionAssignmentsResponseTopic) Default ¶
func (v *AlterPartitionAssignmentsResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterPartitionAssignmentsResponseTopic.
type AlterPartitionAssignmentsResponseTopicPartition ¶
type AlterPartitionAssignmentsResponseTopicPartition struct { // Partition is the partition being responded to. Partition int32 // ErrorCode is the error code returned for partition reassignments. // // REQUEST_TIMED_OUT is returned if the request timed out. // // NOT_CONTROLLER is returned if the request was not issued to a Kafka // controller. // // CLUSTER_AUTHORIZATION_FAILED is returned if the client is not // authorized to reassign partitions. // // NO_REASSIGNMENT_IN_PROGRESS is returned for partition reassignment // cancellations when the partition was not being reassigned. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of // the requested topic or the topic is being deleted. ErrorCode int16 // ErrorMessage is an informative message if the partition reassignment failed. ErrorMessage *string }
func NewAlterPartitionAssignmentsResponseTopicPartition ¶
func NewAlterPartitionAssignmentsResponseTopicPartition() AlterPartitionAssignmentsResponseTopicPartition
NewAlterPartitionAssignmentsResponseTopicPartition returns a default AlterPartitionAssignmentsResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*AlterPartitionAssignmentsResponseTopicPartition) Default ¶
func (v *AlterPartitionAssignmentsResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterPartitionAssignmentsResponseTopicPartition.
type AlterReplicaLogDirsRequest ¶
type AlterReplicaLogDirsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Dirs contains absolute paths of where you want things to end up. Dirs []AlterReplicaLogDirsRequestDir }
AlterReplicaLogDirsRequest requests for log directories to be moved within Kafka.
This is primarily useful for moving directories between disks.
func NewAlterReplicaLogDirsRequest ¶
func NewAlterReplicaLogDirsRequest() AlterReplicaLogDirsRequest
NewAlterReplicaLogDirsRequest returns a default AlterReplicaLogDirsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterReplicaLogDirsRequest ¶
func NewPtrAlterReplicaLogDirsRequest() *AlterReplicaLogDirsRequest
NewPtrAlterReplicaLogDirsRequest returns a pointer to a default AlterReplicaLogDirsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterReplicaLogDirsRequest) AppendTo ¶
func (v *AlterReplicaLogDirsRequest) AppendTo(dst []byte) []byte
func (*AlterReplicaLogDirsRequest) Default ¶
func (v *AlterReplicaLogDirsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterReplicaLogDirsRequest.
func (*AlterReplicaLogDirsRequest) GetVersion ¶
func (v *AlterReplicaLogDirsRequest) GetVersion() int16
func (*AlterReplicaLogDirsRequest) IsFlexible ¶
func (v *AlterReplicaLogDirsRequest) IsFlexible() bool
func (*AlterReplicaLogDirsRequest) Key ¶
func (*AlterReplicaLogDirsRequest) Key() int16
func (*AlterReplicaLogDirsRequest) MaxVersion ¶
func (*AlterReplicaLogDirsRequest) MaxVersion() int16
func (*AlterReplicaLogDirsRequest) ReadFrom ¶
func (v *AlterReplicaLogDirsRequest) ReadFrom(src []byte) error
func (*AlterReplicaLogDirsRequest) RequestWith ¶
func (v *AlterReplicaLogDirsRequest) RequestWith(ctx context.Context, r Requestor) (*AlterReplicaLogDirsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*AlterReplicaLogDirsRequest) ResponseKind ¶
func (v *AlterReplicaLogDirsRequest) ResponseKind() Response
func (*AlterReplicaLogDirsRequest) SetVersion ¶
func (v *AlterReplicaLogDirsRequest) SetVersion(version int16)
type AlterReplicaLogDirsRequestDir ¶
type AlterReplicaLogDirsRequestDir struct { // Dir is an absolute path where everything listed below should // end up. Dir string // Topics contains topics to move to the above log directory. Topics []AlterReplicaLogDirsRequestDirTopic }
func NewAlterReplicaLogDirsRequestDir ¶
func NewAlterReplicaLogDirsRequestDir() AlterReplicaLogDirsRequestDir
NewAlterReplicaLogDirsRequestDir returns a default AlterReplicaLogDirsRequestDir This is a shortcut for creating a struct and calling Default yourself.
func (*AlterReplicaLogDirsRequestDir) Default ¶
func (v *AlterReplicaLogDirsRequestDir) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterReplicaLogDirsRequestDir.
type AlterReplicaLogDirsRequestDirTopic ¶
type AlterReplicaLogDirsRequestDirTopic struct { // Topic is a topic to move. Topic string // Partitions contains partitions for the topic to move. Partitions []int32 }
func NewAlterReplicaLogDirsRequestDirTopic ¶
func NewAlterReplicaLogDirsRequestDirTopic() AlterReplicaLogDirsRequestDirTopic
NewAlterReplicaLogDirsRequestDirTopic returns a default AlterReplicaLogDirsRequestDirTopic This is a shortcut for creating a struct and calling Default yourself.
func (*AlterReplicaLogDirsRequestDirTopic) Default ¶
func (v *AlterReplicaLogDirsRequestDirTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterReplicaLogDirsRequestDirTopic.
type AlterReplicaLogDirsResponse ¶
type AlterReplicaLogDirsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Topics contains responses to each topic that had partitions requested // for moving. Topics []AlterReplicaLogDirsResponseTopic }
AlterReplicaLogDirsResponse is returned from an AlterReplicaLogDirsRequest.
func NewAlterReplicaLogDirsResponse ¶
func NewAlterReplicaLogDirsResponse() AlterReplicaLogDirsResponse
NewAlterReplicaLogDirsResponse returns a default AlterReplicaLogDirsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterReplicaLogDirsResponse ¶
func NewPtrAlterReplicaLogDirsResponse() *AlterReplicaLogDirsResponse
NewPtrAlterReplicaLogDirsResponse returns a pointer to a default AlterReplicaLogDirsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterReplicaLogDirsResponse) AppendTo ¶
func (v *AlterReplicaLogDirsResponse) AppendTo(dst []byte) []byte
func (*AlterReplicaLogDirsResponse) Default ¶
func (v *AlterReplicaLogDirsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterReplicaLogDirsResponse.
func (*AlterReplicaLogDirsResponse) GetVersion ¶
func (v *AlterReplicaLogDirsResponse) GetVersion() int16
func (*AlterReplicaLogDirsResponse) IsFlexible ¶
func (v *AlterReplicaLogDirsResponse) IsFlexible() bool
func (*AlterReplicaLogDirsResponse) Key ¶
func (*AlterReplicaLogDirsResponse) Key() int16
func (*AlterReplicaLogDirsResponse) MaxVersion ¶
func (*AlterReplicaLogDirsResponse) MaxVersion() int16
func (*AlterReplicaLogDirsResponse) ReadFrom ¶
func (v *AlterReplicaLogDirsResponse) ReadFrom(src []byte) error
func (*AlterReplicaLogDirsResponse) RequestKind ¶
func (v *AlterReplicaLogDirsResponse) RequestKind() Request
func (*AlterReplicaLogDirsResponse) SetVersion ¶
func (v *AlterReplicaLogDirsResponse) SetVersion(version int16)
func (*AlterReplicaLogDirsResponse) Throttle ¶ added in v0.6.2
func (v *AlterReplicaLogDirsResponse) Throttle() (int32, bool)
type AlterReplicaLogDirsResponseTopic ¶
type AlterReplicaLogDirsResponseTopic struct { // Topic is the topic this array slot corresponds to. Topic string // Partitions contains responses to each partition that was requested // to move. Partitions []AlterReplicaLogDirsResponseTopicPartition }
func NewAlterReplicaLogDirsResponseTopic ¶
func NewAlterReplicaLogDirsResponseTopic() AlterReplicaLogDirsResponseTopic
NewAlterReplicaLogDirsResponseTopic returns a default AlterReplicaLogDirsResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*AlterReplicaLogDirsResponseTopic) Default ¶
func (v *AlterReplicaLogDirsResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterReplicaLogDirsResponseTopic.
type AlterReplicaLogDirsResponseTopicPartition ¶
type AlterReplicaLogDirsResponseTopicPartition struct { // Partition is the partition this array slot corresponds to. Partition int32 // CLUSTER_AUTHORIZATION_FAILED is returned if the client is not // authorized to alter replica dirs. // // LOG_DIR_NOT_FOUND is returned when the requested log directory // is not in the broker config. // // KAFKA_STORAGE_EXCEPTION is returned when destination directory or // requested replica is offline. // // REPLICA_NOT_AVAILABLE is returned if the replica does not exist // yet. ErrorCode int16 }
func NewAlterReplicaLogDirsResponseTopicPartition ¶
func NewAlterReplicaLogDirsResponseTopicPartition() AlterReplicaLogDirsResponseTopicPartition
NewAlterReplicaLogDirsResponseTopicPartition returns a default AlterReplicaLogDirsResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*AlterReplicaLogDirsResponseTopicPartition) Default ¶
func (v *AlterReplicaLogDirsResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterReplicaLogDirsResponseTopicPartition.
type AlterUserSCRAMCredentialsRequest ¶
type AlterUserSCRAMCredentialsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The SCRAM credentials to remove. Deletions []AlterUserSCRAMCredentialsRequestDeletion // The SCRAM credentials to update or insert. Upsertions []AlterUserSCRAMCredentialsRequestUpsertion }
AlterUserSCRAMCredentialsRequest, proposed in KIP-554 and introduced with Kafka 2.7.0, alters or deletes user SCRAM credentials.
This request was introduced as part of the overarching KIP-500 initiative, which is to remove Zookeeper as a dependency.
This request requires ALTER on CLUSTER.
func NewAlterUserSCRAMCredentialsRequest ¶
func NewAlterUserSCRAMCredentialsRequest() AlterUserSCRAMCredentialsRequest
NewAlterUserSCRAMCredentialsRequest returns a default AlterUserSCRAMCredentialsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterUserSCRAMCredentialsRequest ¶
func NewPtrAlterUserSCRAMCredentialsRequest() *AlterUserSCRAMCredentialsRequest
NewPtrAlterUserSCRAMCredentialsRequest returns a pointer to a default AlterUserSCRAMCredentialsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterUserSCRAMCredentialsRequest) AppendTo ¶
func (v *AlterUserSCRAMCredentialsRequest) AppendTo(dst []byte) []byte
func (*AlterUserSCRAMCredentialsRequest) Default ¶
func (v *AlterUserSCRAMCredentialsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterUserSCRAMCredentialsRequest.
func (*AlterUserSCRAMCredentialsRequest) GetVersion ¶
func (v *AlterUserSCRAMCredentialsRequest) GetVersion() int16
func (*AlterUserSCRAMCredentialsRequest) IsAdminRequest ¶
func (v *AlterUserSCRAMCredentialsRequest) IsAdminRequest()
func (*AlterUserSCRAMCredentialsRequest) IsFlexible ¶
func (v *AlterUserSCRAMCredentialsRequest) IsFlexible() bool
func (*AlterUserSCRAMCredentialsRequest) Key ¶
func (*AlterUserSCRAMCredentialsRequest) Key() int16
func (*AlterUserSCRAMCredentialsRequest) MaxVersion ¶
func (*AlterUserSCRAMCredentialsRequest) MaxVersion() int16
func (*AlterUserSCRAMCredentialsRequest) ReadFrom ¶
func (v *AlterUserSCRAMCredentialsRequest) ReadFrom(src []byte) error
func (*AlterUserSCRAMCredentialsRequest) RequestWith ¶
func (v *AlterUserSCRAMCredentialsRequest) RequestWith(ctx context.Context, r Requestor) (*AlterUserSCRAMCredentialsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*AlterUserSCRAMCredentialsRequest) ResponseKind ¶
func (v *AlterUserSCRAMCredentialsRequest) ResponseKind() Response
func (*AlterUserSCRAMCredentialsRequest) SetVersion ¶
func (v *AlterUserSCRAMCredentialsRequest) SetVersion(version int16)
type AlterUserSCRAMCredentialsRequestDeletion ¶
type AlterUserSCRAMCredentialsRequestDeletion struct { // The user name to match for removal. Name string // The mechanism for the user name to remove. Mechanism int8 }
func NewAlterUserSCRAMCredentialsRequestDeletion ¶
func NewAlterUserSCRAMCredentialsRequestDeletion() AlterUserSCRAMCredentialsRequestDeletion
NewAlterUserSCRAMCredentialsRequestDeletion returns a default AlterUserSCRAMCredentialsRequestDeletion This is a shortcut for creating a struct and calling Default yourself.
func (*AlterUserSCRAMCredentialsRequestDeletion) Default ¶
func (v *AlterUserSCRAMCredentialsRequestDeletion) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterUserSCRAMCredentialsRequestDeletion.
type AlterUserSCRAMCredentialsRequestUpsertion ¶
type AlterUserSCRAMCredentialsRequestUpsertion struct { // The user name to use. Name string // The mechanism to use for creating, where 1 is SCRAM-SHA-256 and 2 is // SCRAM-SHA-512. Mechanism int8 // The number of iterations to use. This must be more than the minimum for // the mechanism and cannot be more than 16384. Iterations int32 // A random salt generated by the client. Salt []byte // The salted password to use. SaltedPassword []byte }
func NewAlterUserSCRAMCredentialsRequestUpsertion ¶
func NewAlterUserSCRAMCredentialsRequestUpsertion() AlterUserSCRAMCredentialsRequestUpsertion
NewAlterUserSCRAMCredentialsRequestUpsertion returns a default AlterUserSCRAMCredentialsRequestUpsertion This is a shortcut for creating a struct and calling Default yourself.
func (*AlterUserSCRAMCredentialsRequestUpsertion) Default ¶
func (v *AlterUserSCRAMCredentialsRequestUpsertion) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterUserSCRAMCredentialsRequestUpsertion.
type AlterUserSCRAMCredentialsResponse ¶
type AlterUserSCRAMCredentialsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // The results for deletions and upsertions. Results []AlterUserSCRAMCredentialsResponseResult }
AlterUserSCRAMCredentialsResponse is a response for an AlterUserSCRAMCredentialsRequest.
func NewAlterUserSCRAMCredentialsResponse ¶
func NewAlterUserSCRAMCredentialsResponse() AlterUserSCRAMCredentialsResponse
NewAlterUserSCRAMCredentialsResponse returns a default AlterUserSCRAMCredentialsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrAlterUserSCRAMCredentialsResponse ¶
func NewPtrAlterUserSCRAMCredentialsResponse() *AlterUserSCRAMCredentialsResponse
NewPtrAlterUserSCRAMCredentialsResponse returns a pointer to a default AlterUserSCRAMCredentialsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*AlterUserSCRAMCredentialsResponse) AppendTo ¶
func (v *AlterUserSCRAMCredentialsResponse) AppendTo(dst []byte) []byte
func (*AlterUserSCRAMCredentialsResponse) Default ¶
func (v *AlterUserSCRAMCredentialsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterUserSCRAMCredentialsResponse.
func (*AlterUserSCRAMCredentialsResponse) GetVersion ¶
func (v *AlterUserSCRAMCredentialsResponse) GetVersion() int16
func (*AlterUserSCRAMCredentialsResponse) IsFlexible ¶
func (v *AlterUserSCRAMCredentialsResponse) IsFlexible() bool
func (*AlterUserSCRAMCredentialsResponse) Key ¶
func (*AlterUserSCRAMCredentialsResponse) Key() int16
func (*AlterUserSCRAMCredentialsResponse) MaxVersion ¶
func (*AlterUserSCRAMCredentialsResponse) MaxVersion() int16
func (*AlterUserSCRAMCredentialsResponse) ReadFrom ¶
func (v *AlterUserSCRAMCredentialsResponse) ReadFrom(src []byte) error
func (*AlterUserSCRAMCredentialsResponse) RequestKind ¶
func (v *AlterUserSCRAMCredentialsResponse) RequestKind() Request
func (*AlterUserSCRAMCredentialsResponse) SetVersion ¶
func (v *AlterUserSCRAMCredentialsResponse) SetVersion(version int16)
func (*AlterUserSCRAMCredentialsResponse) Throttle ¶ added in v0.6.2
func (v *AlterUserSCRAMCredentialsResponse) Throttle() (int32, bool)
type AlterUserSCRAMCredentialsResponseResult ¶
type AlterUserSCRAMCredentialsResponseResult struct { // The name this result corresponds to. User string // The user-level error code. ErrorCode int16 // The user-level error message, if any. ErrorMessage *string }
func NewAlterUserSCRAMCredentialsResponseResult ¶
func NewAlterUserSCRAMCredentialsResponseResult() AlterUserSCRAMCredentialsResponseResult
NewAlterUserSCRAMCredentialsResponseResult returns a default AlterUserSCRAMCredentialsResponseResult This is a shortcut for creating a struct and calling Default yourself.
func (*AlterUserSCRAMCredentialsResponseResult) Default ¶
func (v *AlterUserSCRAMCredentialsResponseResult) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to AlterUserSCRAMCredentialsResponseResult.
type ApiVersionsRequest ¶
type ApiVersionsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // ClientSoftwareName, added for KIP-511 with Kafka 2.4.0, is the name of the // client issuing this request. The broker can use this to enrich its own // debugging information of which version of what clients are connected. // // If using v3, this field is required and must match the following pattern: // // [a-zA-Z0-9](?:[a-zA-Z0-9\\-.]*[a-zA-Z0-9])? // ClientSoftwareName string // v3+ // ClientSoftwareVersion is the version of the software name in the prior // field. It must match the same regex (thus, this is also required). ClientSoftwareVersion string // v3+ }
ApiVersionsRequest requests what API versions a Kafka broker supports.
Note that the client does not know the version a broker supports before sending this request.
Before Kafka 2.4.0, if the client used a version larger than the broker understands, the broker would reply with an UNSUPPORTED_VERSION error using the version 0 message format (i.e., 6 bytes long!). The client should retry with a lower version.
After Kafka 2.4.0, if the client uses a version larger than the broker understands, the broker replies with UNSUPPORTED_VERSIONS using the version 0 message format but additionally includes the api versions the broker does support.
func NewApiVersionsRequest ¶
func NewApiVersionsRequest() ApiVersionsRequest
NewApiVersionsRequest returns a default ApiVersionsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrApiVersionsRequest ¶
func NewPtrApiVersionsRequest() *ApiVersionsRequest
NewPtrApiVersionsRequest returns a pointer to a default ApiVersionsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ApiVersionsRequest) AppendTo ¶
func (v *ApiVersionsRequest) AppendTo(dst []byte) []byte
func (*ApiVersionsRequest) Default ¶
func (v *ApiVersionsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ApiVersionsRequest.
func (*ApiVersionsRequest) GetVersion ¶
func (v *ApiVersionsRequest) GetVersion() int16
func (*ApiVersionsRequest) IsFlexible ¶
func (v *ApiVersionsRequest) IsFlexible() bool
func (*ApiVersionsRequest) Key ¶
func (*ApiVersionsRequest) Key() int16
func (*ApiVersionsRequest) MaxVersion ¶
func (*ApiVersionsRequest) MaxVersion() int16
func (*ApiVersionsRequest) ReadFrom ¶
func (v *ApiVersionsRequest) ReadFrom(src []byte) error
func (*ApiVersionsRequest) RequestWith ¶
func (v *ApiVersionsRequest) RequestWith(ctx context.Context, r Requestor) (*ApiVersionsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ApiVersionsRequest) ResponseKind ¶
func (v *ApiVersionsRequest) ResponseKind() Response
func (*ApiVersionsRequest) SetVersion ¶
func (v *ApiVersionsRequest) SetVersion(version int16)
type ApiVersionsResponse ¶
type ApiVersionsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ErrorCode is UNSUPPORTED_VERSION if the request was issued with a higher // version than the broker supports. Before Kafka 2.4.0, if this error is // returned, the rest of this struct will be empty. // // Starting in Kafka 2.4.0 (with version 3), even with an UNSUPPORTED_VERSION // error, the broker still replies with the ApiKeys it supports. ErrorCode int16 // ApiKeys is an array corresponding to API keys the broker supports // and the range of supported versions for each key. ApiKeys []ApiVersionsResponseApiKey // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // v1+ // Features supported by the broker (see KIP-584). SupportedFeatures []ApiVersionsResponseSupportedFeature // tag 0 // The monotonically increasing epoch for the finalized features information, // where -1 indicates an unknown epoch. FinalizedFeaturesEpoch int64 // tag 1 // The list of cluster-wide finalized features (only valid if // FinalizedFeaturesEpoch is >= 0). FinalizedFeatures []ApiVersionsResponseFinalizedFeature // tag 2 }
ApiVersionsResponse is returned from an ApiVersionsRequest.
func NewApiVersionsResponse ¶
func NewApiVersionsResponse() ApiVersionsResponse
NewApiVersionsResponse returns a default ApiVersionsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrApiVersionsResponse ¶
func NewPtrApiVersionsResponse() *ApiVersionsResponse
NewPtrApiVersionsResponse returns a pointer to a default ApiVersionsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ApiVersionsResponse) AppendTo ¶
func (v *ApiVersionsResponse) AppendTo(dst []byte) []byte
func (*ApiVersionsResponse) Default ¶
func (v *ApiVersionsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ApiVersionsResponse.
func (*ApiVersionsResponse) GetVersion ¶
func (v *ApiVersionsResponse) GetVersion() int16
func (*ApiVersionsResponse) IsFlexible ¶
func (v *ApiVersionsResponse) IsFlexible() bool
func (*ApiVersionsResponse) Key ¶
func (*ApiVersionsResponse) Key() int16
func (*ApiVersionsResponse) MaxVersion ¶
func (*ApiVersionsResponse) MaxVersion() int16
func (*ApiVersionsResponse) ReadFrom ¶
func (v *ApiVersionsResponse) ReadFrom(src []byte) error
func (*ApiVersionsResponse) RequestKind ¶
func (v *ApiVersionsResponse) RequestKind() Request
func (*ApiVersionsResponse) SetVersion ¶
func (v *ApiVersionsResponse) SetVersion(version int16)
func (*ApiVersionsResponse) Throttle ¶ added in v0.6.2
func (v *ApiVersionsResponse) Throttle() (int32, bool)
type ApiVersionsResponseApiKey ¶
type ApiVersionsResponseApiKey struct { // ApiKey is the key of a message request. ApiKey int16 // MinVersion is the min version a broker supports for an API key. MinVersion int16 // MaxVersion is the max version a broker supports for an API key. MaxVersion int16 }
func NewApiVersionsResponseApiKey ¶
func NewApiVersionsResponseApiKey() ApiVersionsResponseApiKey
NewApiVersionsResponseApiKey returns a default ApiVersionsResponseApiKey This is a shortcut for creating a struct and calling Default yourself.
func (*ApiVersionsResponseApiKey) Default ¶
func (v *ApiVersionsResponseApiKey) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ApiVersionsResponseApiKey.
type ApiVersionsResponseFinalizedFeature ¶
type ApiVersionsResponseFinalizedFeature struct { // The name of the feature. Name string // The cluster-wide finalized max version level for the feature. MaxVersionLevel int16 // The cluster-wide finalized min version level for the feature. MinVersionLevel int16 }
func NewApiVersionsResponseFinalizedFeature ¶
func NewApiVersionsResponseFinalizedFeature() ApiVersionsResponseFinalizedFeature
NewApiVersionsResponseFinalizedFeature returns a default ApiVersionsResponseFinalizedFeature This is a shortcut for creating a struct and calling Default yourself.
func (*ApiVersionsResponseFinalizedFeature) Default ¶
func (v *ApiVersionsResponseFinalizedFeature) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ApiVersionsResponseFinalizedFeature.
type ApiVersionsResponseSupportedFeature ¶
type ApiVersionsResponseSupportedFeature struct { // The name of the feature. Name string // The minimum supported version for the feature. MinVersion int16 // The maximum supported version for the feature. MaxVersion int16 }
func NewApiVersionsResponseSupportedFeature ¶
func NewApiVersionsResponseSupportedFeature() ApiVersionsResponseSupportedFeature
NewApiVersionsResponseSupportedFeature returns a default ApiVersionsResponseSupportedFeature This is a shortcut for creating a struct and calling Default yourself.
func (*ApiVersionsResponseSupportedFeature) Default ¶
func (v *ApiVersionsResponseSupportedFeature) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ApiVersionsResponseSupportedFeature.
type BeginQuorumEpochRequest ¶
type BeginQuorumEpochRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 ClusterID *string Topics []BeginQuorumEpochRequestTopic }
Part of KIP-595 to replace Kafka's dependence on Zookeeper with a Kafka-only raft protocol, BeginQuorumEpochRequest is sent by a leader (once it has enough votes) to all voters in the election.
Since this is relatively Kafka internal, most fields are left undocumented.
func NewBeginQuorumEpochRequest ¶
func NewBeginQuorumEpochRequest() BeginQuorumEpochRequest
NewBeginQuorumEpochRequest returns a default BeginQuorumEpochRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrBeginQuorumEpochRequest ¶
func NewPtrBeginQuorumEpochRequest() *BeginQuorumEpochRequest
NewPtrBeginQuorumEpochRequest returns a pointer to a default BeginQuorumEpochRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*BeginQuorumEpochRequest) AppendTo ¶
func (v *BeginQuorumEpochRequest) AppendTo(dst []byte) []byte
func (*BeginQuorumEpochRequest) Default ¶
func (v *BeginQuorumEpochRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BeginQuorumEpochRequest.
func (*BeginQuorumEpochRequest) GetVersion ¶
func (v *BeginQuorumEpochRequest) GetVersion() int16
func (*BeginQuorumEpochRequest) IsAdminRequest ¶
func (v *BeginQuorumEpochRequest) IsAdminRequest()
func (*BeginQuorumEpochRequest) IsFlexible ¶
func (v *BeginQuorumEpochRequest) IsFlexible() bool
func (*BeginQuorumEpochRequest) Key ¶
func (*BeginQuorumEpochRequest) Key() int16
func (*BeginQuorumEpochRequest) MaxVersion ¶
func (*BeginQuorumEpochRequest) MaxVersion() int16
func (*BeginQuorumEpochRequest) ReadFrom ¶
func (v *BeginQuorumEpochRequest) ReadFrom(src []byte) error
func (*BeginQuorumEpochRequest) RequestWith ¶
func (v *BeginQuorumEpochRequest) RequestWith(ctx context.Context, r Requestor) (*BeginQuorumEpochResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*BeginQuorumEpochRequest) ResponseKind ¶
func (v *BeginQuorumEpochRequest) ResponseKind() Response
func (*BeginQuorumEpochRequest) SetVersion ¶
func (v *BeginQuorumEpochRequest) SetVersion(version int16)
type BeginQuorumEpochRequestTopic ¶
type BeginQuorumEpochRequestTopic struct { Topic string Partitions []BeginQuorumEpochRequestTopicPartition }
func NewBeginQuorumEpochRequestTopic ¶
func NewBeginQuorumEpochRequestTopic() BeginQuorumEpochRequestTopic
NewBeginQuorumEpochRequestTopic returns a default BeginQuorumEpochRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*BeginQuorumEpochRequestTopic) Default ¶
func (v *BeginQuorumEpochRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BeginQuorumEpochRequestTopic.
type BeginQuorumEpochRequestTopicPartition ¶
type BeginQuorumEpochRequestTopicPartition struct { Partition int32 // The ID of the newly elected leader. LeaderID int32 // The epoch of the newly elected leader. LeaderEpoch int32 }
func NewBeginQuorumEpochRequestTopicPartition ¶
func NewBeginQuorumEpochRequestTopicPartition() BeginQuorumEpochRequestTopicPartition
NewBeginQuorumEpochRequestTopicPartition returns a default BeginQuorumEpochRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*BeginQuorumEpochRequestTopicPartition) Default ¶
func (v *BeginQuorumEpochRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BeginQuorumEpochRequestTopicPartition.
type BeginQuorumEpochResponse ¶
type BeginQuorumEpochResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 ErrorCode int16 Topics []BeginQuorumEpochResponseTopic }
func NewBeginQuorumEpochResponse ¶
func NewBeginQuorumEpochResponse() BeginQuorumEpochResponse
NewBeginQuorumEpochResponse returns a default BeginQuorumEpochResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrBeginQuorumEpochResponse ¶
func NewPtrBeginQuorumEpochResponse() *BeginQuorumEpochResponse
NewPtrBeginQuorumEpochResponse returns a pointer to a default BeginQuorumEpochResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*BeginQuorumEpochResponse) AppendTo ¶
func (v *BeginQuorumEpochResponse) AppendTo(dst []byte) []byte
func (*BeginQuorumEpochResponse) Default ¶
func (v *BeginQuorumEpochResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BeginQuorumEpochResponse.
func (*BeginQuorumEpochResponse) GetVersion ¶
func (v *BeginQuorumEpochResponse) GetVersion() int16
func (*BeginQuorumEpochResponse) IsFlexible ¶
func (v *BeginQuorumEpochResponse) IsFlexible() bool
func (*BeginQuorumEpochResponse) Key ¶
func (*BeginQuorumEpochResponse) Key() int16
func (*BeginQuorumEpochResponse) MaxVersion ¶
func (*BeginQuorumEpochResponse) MaxVersion() int16
func (*BeginQuorumEpochResponse) ReadFrom ¶
func (v *BeginQuorumEpochResponse) ReadFrom(src []byte) error
func (*BeginQuorumEpochResponse) RequestKind ¶
func (v *BeginQuorumEpochResponse) RequestKind() Request
func (*BeginQuorumEpochResponse) SetVersion ¶
func (v *BeginQuorumEpochResponse) SetVersion(version int16)
type BeginQuorumEpochResponseTopic ¶
type BeginQuorumEpochResponseTopic struct { Topic string Partitions []BeginQuorumEpochResponseTopicPartition }
func NewBeginQuorumEpochResponseTopic ¶
func NewBeginQuorumEpochResponseTopic() BeginQuorumEpochResponseTopic
NewBeginQuorumEpochResponseTopic returns a default BeginQuorumEpochResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*BeginQuorumEpochResponseTopic) Default ¶
func (v *BeginQuorumEpochResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BeginQuorumEpochResponseTopic.
type BeginQuorumEpochResponseTopicPartition ¶
type BeginQuorumEpochResponseTopicPartition struct { Partition int32 ErrorCode int16 // The ID of the current leader, or -1 if the leader is unknown. LeaderID int32 // The latest known leader epoch. LeaderEpoch int32 }
func NewBeginQuorumEpochResponseTopicPartition ¶
func NewBeginQuorumEpochResponseTopicPartition() BeginQuorumEpochResponseTopicPartition
NewBeginQuorumEpochResponseTopicPartition returns a default BeginQuorumEpochResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*BeginQuorumEpochResponseTopicPartition) Default ¶
func (v *BeginQuorumEpochResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BeginQuorumEpochResponseTopicPartition.
type BrokerHeartbeatRequest ¶ added in v0.6.4
type BrokerHeartbeatRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The broker ID. BrokerID int32 // The broker's epoch. BrokerEpoch int64 // The highest metadata offset that the broker has reached. CurrentMetadataOffset int64 // True if the broker wants to be fenced. WantFence bool // True if the broker wants to be shutdown. WantShutdown bool }
For KIP-500 / KIP-631, BrokerHeartbeatRequest is an internal broker-to-broker only request.
func NewBrokerHeartbeatRequest ¶ added in v0.6.4
func NewBrokerHeartbeatRequest() BrokerHeartbeatRequest
NewBrokerHeartbeatRequest returns a default BrokerHeartbeatRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrBrokerHeartbeatRequest ¶ added in v0.6.4
func NewPtrBrokerHeartbeatRequest() *BrokerHeartbeatRequest
NewPtrBrokerHeartbeatRequest returns a pointer to a default BrokerHeartbeatRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*BrokerHeartbeatRequest) AppendTo ¶ added in v0.6.4
func (v *BrokerHeartbeatRequest) AppendTo(dst []byte) []byte
func (*BrokerHeartbeatRequest) Default ¶ added in v0.6.4
func (v *BrokerHeartbeatRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BrokerHeartbeatRequest.
func (*BrokerHeartbeatRequest) GetVersion ¶ added in v0.6.4
func (v *BrokerHeartbeatRequest) GetVersion() int16
func (*BrokerHeartbeatRequest) IsFlexible ¶ added in v0.6.4
func (v *BrokerHeartbeatRequest) IsFlexible() bool
func (*BrokerHeartbeatRequest) Key ¶ added in v0.6.4
func (*BrokerHeartbeatRequest) Key() int16
func (*BrokerHeartbeatRequest) MaxVersion ¶ added in v0.6.4
func (*BrokerHeartbeatRequest) MaxVersion() int16
func (*BrokerHeartbeatRequest) ReadFrom ¶ added in v0.6.4
func (v *BrokerHeartbeatRequest) ReadFrom(src []byte) error
func (*BrokerHeartbeatRequest) RequestWith ¶ added in v0.6.4
func (v *BrokerHeartbeatRequest) RequestWith(ctx context.Context, r Requestor) (*BrokerHeartbeatResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*BrokerHeartbeatRequest) ResponseKind ¶ added in v0.6.4
func (v *BrokerHeartbeatRequest) ResponseKind() Response
func (*BrokerHeartbeatRequest) SetVersion ¶ added in v0.6.4
func (v *BrokerHeartbeatRequest) SetVersion(version int16)
type BrokerHeartbeatResponse ¶ added in v0.6.4
type BrokerHeartbeatResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // Any error code, or 0. ErrorCode int16 // True if the broker has approximately caught up with the latest metadata. IsCaughtUp bool // True if the broker is fenced. IsFenced bool // True if the broker should proceed with its shutdown. ShouldShutdown bool }
BrokerHeartbeatResponse is a response to a BrokerHeartbeatRequest.
func NewBrokerHeartbeatResponse ¶ added in v0.6.4
func NewBrokerHeartbeatResponse() BrokerHeartbeatResponse
NewBrokerHeartbeatResponse returns a default BrokerHeartbeatResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrBrokerHeartbeatResponse ¶ added in v0.6.4
func NewPtrBrokerHeartbeatResponse() *BrokerHeartbeatResponse
NewPtrBrokerHeartbeatResponse returns a pointer to a default BrokerHeartbeatResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*BrokerHeartbeatResponse) AppendTo ¶ added in v0.6.4
func (v *BrokerHeartbeatResponse) AppendTo(dst []byte) []byte
func (*BrokerHeartbeatResponse) Default ¶ added in v0.6.4
func (v *BrokerHeartbeatResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BrokerHeartbeatResponse.
func (*BrokerHeartbeatResponse) GetVersion ¶ added in v0.6.4
func (v *BrokerHeartbeatResponse) GetVersion() int16
func (*BrokerHeartbeatResponse) IsFlexible ¶ added in v0.6.4
func (v *BrokerHeartbeatResponse) IsFlexible() bool
func (*BrokerHeartbeatResponse) Key ¶ added in v0.6.4
func (*BrokerHeartbeatResponse) Key() int16
func (*BrokerHeartbeatResponse) MaxVersion ¶ added in v0.6.4
func (*BrokerHeartbeatResponse) MaxVersion() int16
func (*BrokerHeartbeatResponse) ReadFrom ¶ added in v0.6.4
func (v *BrokerHeartbeatResponse) ReadFrom(src []byte) error
func (*BrokerHeartbeatResponse) RequestKind ¶ added in v0.6.4
func (v *BrokerHeartbeatResponse) RequestKind() Request
func (*BrokerHeartbeatResponse) SetVersion ¶ added in v0.6.4
func (v *BrokerHeartbeatResponse) SetVersion(version int16)
func (*BrokerHeartbeatResponse) Throttle ¶ added in v0.6.4
func (v *BrokerHeartbeatResponse) Throttle() (int32, bool)
type BrokerRegistrationRequest ¶ added in v0.6.4
type BrokerRegistrationRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The broker ID. BrokerID int32 // The cluster ID of the broker process. ClusterID string // The incarnation ID of the broker process. IncarnationID [16]byte // The listeners for this broker. Listeners []BrokerRegistrationRequestListener // Features on this broker. Features []BrokerRegistrationRequestFeature // The rack that this broker is in, if any. Rack *string }
For KIP-500 / KIP-631, BrokerRegistrationRequest is an internal broker-to-broker only request.
func NewBrokerRegistrationRequest ¶ added in v0.6.4
func NewBrokerRegistrationRequest() BrokerRegistrationRequest
NewBrokerRegistrationRequest returns a default BrokerRegistrationRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrBrokerRegistrationRequest ¶ added in v0.6.4
func NewPtrBrokerRegistrationRequest() *BrokerRegistrationRequest
NewPtrBrokerRegistrationRequest returns a pointer to a default BrokerRegistrationRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*BrokerRegistrationRequest) AppendTo ¶ added in v0.6.4
func (v *BrokerRegistrationRequest) AppendTo(dst []byte) []byte
func (*BrokerRegistrationRequest) Default ¶ added in v0.6.4
func (v *BrokerRegistrationRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BrokerRegistrationRequest.
func (*BrokerRegistrationRequest) GetVersion ¶ added in v0.6.4
func (v *BrokerRegistrationRequest) GetVersion() int16
func (*BrokerRegistrationRequest) IsFlexible ¶ added in v0.6.4
func (v *BrokerRegistrationRequest) IsFlexible() bool
func (*BrokerRegistrationRequest) Key ¶ added in v0.6.4
func (*BrokerRegistrationRequest) Key() int16
func (*BrokerRegistrationRequest) MaxVersion ¶ added in v0.6.4
func (*BrokerRegistrationRequest) MaxVersion() int16
func (*BrokerRegistrationRequest) ReadFrom ¶ added in v0.6.4
func (v *BrokerRegistrationRequest) ReadFrom(src []byte) error
func (*BrokerRegistrationRequest) RequestWith ¶ added in v0.6.4
func (v *BrokerRegistrationRequest) RequestWith(ctx context.Context, r Requestor) (*BrokerRegistrationResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*BrokerRegistrationRequest) ResponseKind ¶ added in v0.6.4
func (v *BrokerRegistrationRequest) ResponseKind() Response
func (*BrokerRegistrationRequest) SetVersion ¶ added in v0.6.4
func (v *BrokerRegistrationRequest) SetVersion(version int16)
type BrokerRegistrationRequestFeature ¶ added in v0.6.4
type BrokerRegistrationRequestFeature struct { // The name of the feature. Name string // The minimum supported feature level. MinSupportedVersion int16 // The maximum supported feature level. MaxSupportedVersion int16 }
func NewBrokerRegistrationRequestFeature ¶ added in v0.6.4
func NewBrokerRegistrationRequestFeature() BrokerRegistrationRequestFeature
NewBrokerRegistrationRequestFeature returns a default BrokerRegistrationRequestFeature This is a shortcut for creating a struct and calling Default yourself.
func (*BrokerRegistrationRequestFeature) Default ¶ added in v0.6.4
func (v *BrokerRegistrationRequestFeature) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BrokerRegistrationRequestFeature.
type BrokerRegistrationRequestListener ¶ added in v0.6.4
type BrokerRegistrationRequestListener struct { // The name of this endpoint. Name string // The hostname. Host string // The port. Port uint16 // The security protocol. SecurityProtocol int16 }
func NewBrokerRegistrationRequestListener ¶ added in v0.6.4
func NewBrokerRegistrationRequestListener() BrokerRegistrationRequestListener
NewBrokerRegistrationRequestListener returns a default BrokerRegistrationRequestListener This is a shortcut for creating a struct and calling Default yourself.
func (*BrokerRegistrationRequestListener) Default ¶ added in v0.6.4
func (v *BrokerRegistrationRequestListener) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BrokerRegistrationRequestListener.
type BrokerRegistrationResponse ¶ added in v0.6.4
type BrokerRegistrationResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // Any error code, or 0. ErrorCode int16 // The broker's assigned epoch, or -1 if none was assigned. BrokerEpoch int64 }
BrokerRegistrationResponse is a response to a BrokerRegistrationRequest.
func NewBrokerRegistrationResponse ¶ added in v0.6.4
func NewBrokerRegistrationResponse() BrokerRegistrationResponse
NewBrokerRegistrationResponse returns a default BrokerRegistrationResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrBrokerRegistrationResponse ¶ added in v0.6.4
func NewPtrBrokerRegistrationResponse() *BrokerRegistrationResponse
NewPtrBrokerRegistrationResponse returns a pointer to a default BrokerRegistrationResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*BrokerRegistrationResponse) AppendTo ¶ added in v0.6.4
func (v *BrokerRegistrationResponse) AppendTo(dst []byte) []byte
func (*BrokerRegistrationResponse) Default ¶ added in v0.6.4
func (v *BrokerRegistrationResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to BrokerRegistrationResponse.
func (*BrokerRegistrationResponse) GetVersion ¶ added in v0.6.4
func (v *BrokerRegistrationResponse) GetVersion() int16
func (*BrokerRegistrationResponse) IsFlexible ¶ added in v0.6.4
func (v *BrokerRegistrationResponse) IsFlexible() bool
func (*BrokerRegistrationResponse) Key ¶ added in v0.6.4
func (*BrokerRegistrationResponse) Key() int16
func (*BrokerRegistrationResponse) MaxVersion ¶ added in v0.6.4
func (*BrokerRegistrationResponse) MaxVersion() int16
func (*BrokerRegistrationResponse) ReadFrom ¶ added in v0.6.4
func (v *BrokerRegistrationResponse) ReadFrom(src []byte) error
func (*BrokerRegistrationResponse) RequestKind ¶ added in v0.6.4
func (v *BrokerRegistrationResponse) RequestKind() Request
func (*BrokerRegistrationResponse) SetVersion ¶ added in v0.6.4
func (v *BrokerRegistrationResponse) SetVersion(version int16)
func (*BrokerRegistrationResponse) Throttle ¶ added in v0.6.4
func (v *BrokerRegistrationResponse) Throttle() (int32, bool)
type ConfigResourceType ¶
type ConfigResourceType int8
A type of config.
Possible values and their meanings:
* 2 (TOPIC)
* 4 (BROKER)
* 8 (BROKER_LOGGER)
const ( ConfigResourceTypeUnknown ConfigResourceType = 0 ConfigResourceTypeTopic ConfigResourceType = 2 ConfigResourceTypeBroker ConfigResourceType = 4 ConfigResourceTypeBrokerLogger ConfigResourceType = 8 )
func (ConfigResourceType) String ¶
func (v ConfigResourceType) String() string
type ConfigSource ¶
type ConfigSource int8
Where a config entry is from. If there are no config synonyms, the source is DEFAULT_CONFIG.
Possible values and their meanings:
* 1 (DYNAMIC_TOPIC_CONFIG) Dynamic topic config for a specific topic.
* 2 (DYNAMIC_BROKER_CONFIG) Dynamic broker config for a specific broker.
* 3 (DYNAMIC_DEFAULT_BROKER_CONFIG) Dynamic broker config used as the default for all brokers in a cluster.
* 4 (STATIC_BROKER_CONFIG) Static broker config provided at start up.
* 5 (DEFAULT_CONFIG) Build-in default configuration for those that have defaults.
* 6 (DYNAMIC_BROKER_LOGGER_CONFIG) Broker logger; see KIP-412.
const ( ConfigSourceUnknown ConfigSource = 0 ConfigSourceDynamicTopicConfig ConfigSource = 1 ConfigSourceDynamicBrokerConfig ConfigSource = 2 ConfigSourceDynamicDefaultBrokerConfig ConfigSource = 3 ConfigSourceStaticBrokerConfig ConfigSource = 4 ConfigSourceDefaultConfig ConfigSource = 5 ConfigSourceDynamicBrokerLoggerConfig ConfigSource = 6 )
func (ConfigSource) String ¶
func (v ConfigSource) String() string
type ConfigType ¶
type ConfigType int8
A configuration data type.
Possible values and their meanings:
* 1 (BOOLEAN)
* 2 (STRING)
* 3 (INT)
* 4 (SHORT)
* 5 (LONG)
* 6 (DOUBLE)
* 7 (LIST)
* 8 (CLASS)
* 9 (PASSWORD)
const ( ConfigTypeUnknown ConfigType = 0 ConfigTypeBoolean ConfigType = 1 ConfigTypeString ConfigType = 2 ConfigTypeInt ConfigType = 3 ConfigTypeShort ConfigType = 4 ConfigTypeLong ConfigType = 5 ConfigTypeDouble ConfigType = 6 ConfigTypeList ConfigType = 7 ConfigTypeClass ConfigType = 8 ConfigTypePassword ConfigType = 9 )
func (ConfigType) String ¶
func (v ConfigType) String() string
type ControlRecordKey ¶ added in v0.6.10
type ControlRecordKey struct { Version int16 Type ControlRecordKeyType }
ControlRecordKey is the key in a control record.
func NewControlRecordKey ¶ added in v0.6.10
func NewControlRecordKey() ControlRecordKey
NewControlRecordKey returns a default ControlRecordKey This is a shortcut for creating a struct and calling Default yourself.
func (*ControlRecordKey) AppendTo ¶ added in v0.6.10
func (v *ControlRecordKey) AppendTo(dst []byte) []byte
func (*ControlRecordKey) Default ¶ added in v0.6.10
func (v *ControlRecordKey) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ControlRecordKey.
func (*ControlRecordKey) ReadFrom ¶ added in v0.6.10
func (v *ControlRecordKey) ReadFrom(src []byte) error
type ControlRecordKeyType ¶ added in v0.6.10
type ControlRecordKeyType int8
Possible values and their meanings:
* 0 (ABORT)
* 1 (COMMIT)
* 2 (QUORUM_REASSIGNMENT)
* 3 (LEADER_CHANGE)
const ( ControlRecordKeyTypeAbort ControlRecordKeyType = 0 ControlRecordKeyTypeCommit ControlRecordKeyType = 1 ControlRecordKeyTypeQuorumReassignment ControlRecordKeyType = 2 ControlRecordKeyTypeLeaderChange ControlRecordKeyType = 3 )
func (ControlRecordKeyType) String ¶ added in v0.6.10
func (v ControlRecordKeyType) String() string
type ControlledShutdownRequest ¶
type ControlledShutdownRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 BrokerID int32 BrokerEpoch int64 // v2+ }
ControlledShutdownRequest is an advanced request that can be used to sthudown a broker in a controlled manner.
As this is an advanced request and there is little reason to issue it as a client, this request is undocumented. However, the minimal amount of fields here makes the usage rather obvious.
Kafka 2.2.0 introduced version 2, proposed in KIP-380.
Note that version 0 of this request uses a special encoding format where the request does not include the client ID.
func NewControlledShutdownRequest ¶
func NewControlledShutdownRequest() ControlledShutdownRequest
NewControlledShutdownRequest returns a default ControlledShutdownRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrControlledShutdownRequest ¶
func NewPtrControlledShutdownRequest() *ControlledShutdownRequest
NewPtrControlledShutdownRequest returns a pointer to a default ControlledShutdownRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ControlledShutdownRequest) AppendTo ¶
func (v *ControlledShutdownRequest) AppendTo(dst []byte) []byte
func (*ControlledShutdownRequest) Default ¶
func (v *ControlledShutdownRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ControlledShutdownRequest.
func (*ControlledShutdownRequest) GetVersion ¶
func (v *ControlledShutdownRequest) GetVersion() int16
func (*ControlledShutdownRequest) IsFlexible ¶
func (v *ControlledShutdownRequest) IsFlexible() bool
func (*ControlledShutdownRequest) Key ¶
func (*ControlledShutdownRequest) Key() int16
func (*ControlledShutdownRequest) MaxVersion ¶
func (*ControlledShutdownRequest) MaxVersion() int16
func (*ControlledShutdownRequest) ReadFrom ¶
func (v *ControlledShutdownRequest) ReadFrom(src []byte) error
func (*ControlledShutdownRequest) RequestWith ¶
func (v *ControlledShutdownRequest) RequestWith(ctx context.Context, r Requestor) (*ControlledShutdownResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ControlledShutdownRequest) ResponseKind ¶
func (v *ControlledShutdownRequest) ResponseKind() Response
func (*ControlledShutdownRequest) SetVersion ¶
func (v *ControlledShutdownRequest) SetVersion(version int16)
type ControlledShutdownResponse ¶
type ControlledShutdownResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 ErrorCode int16 PartitionsRemaining []ControlledShutdownResponsePartitionsRemaining }
ControlledShutdownResponse is returned from a ControlledShutdownRequest.
func NewControlledShutdownResponse ¶
func NewControlledShutdownResponse() ControlledShutdownResponse
NewControlledShutdownResponse returns a default ControlledShutdownResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrControlledShutdownResponse ¶
func NewPtrControlledShutdownResponse() *ControlledShutdownResponse
NewPtrControlledShutdownResponse returns a pointer to a default ControlledShutdownResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ControlledShutdownResponse) AppendTo ¶
func (v *ControlledShutdownResponse) AppendTo(dst []byte) []byte
func (*ControlledShutdownResponse) Default ¶
func (v *ControlledShutdownResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ControlledShutdownResponse.
func (*ControlledShutdownResponse) GetVersion ¶
func (v *ControlledShutdownResponse) GetVersion() int16
func (*ControlledShutdownResponse) IsFlexible ¶
func (v *ControlledShutdownResponse) IsFlexible() bool
func (*ControlledShutdownResponse) Key ¶
func (*ControlledShutdownResponse) Key() int16
func (*ControlledShutdownResponse) MaxVersion ¶
func (*ControlledShutdownResponse) MaxVersion() int16
func (*ControlledShutdownResponse) ReadFrom ¶
func (v *ControlledShutdownResponse) ReadFrom(src []byte) error
func (*ControlledShutdownResponse) RequestKind ¶
func (v *ControlledShutdownResponse) RequestKind() Request
func (*ControlledShutdownResponse) SetVersion ¶
func (v *ControlledShutdownResponse) SetVersion(version int16)
type ControlledShutdownResponsePartitionsRemaining ¶
func NewControlledShutdownResponsePartitionsRemaining ¶
func NewControlledShutdownResponsePartitionsRemaining() ControlledShutdownResponsePartitionsRemaining
NewControlledShutdownResponsePartitionsRemaining returns a default ControlledShutdownResponsePartitionsRemaining This is a shortcut for creating a struct and calling Default yourself.
func (*ControlledShutdownResponsePartitionsRemaining) Default ¶
func (v *ControlledShutdownResponsePartitionsRemaining) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ControlledShutdownResponsePartitionsRemaining.
type CreateACLsRequest ¶
type CreateACLsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 Creations []CreateACLsRequestCreation }
CreateACLsRequest creates acls. Creating acls can be done as a batch; each "creation" will be an acl entry.
See the DescribeACLsRequest documentation for more descriptions of what valid values for the fields in this request are.
func NewCreateACLsRequest ¶
func NewCreateACLsRequest() CreateACLsRequest
NewCreateACLsRequest returns a default CreateACLsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrCreateACLsRequest ¶
func NewPtrCreateACLsRequest() *CreateACLsRequest
NewPtrCreateACLsRequest returns a pointer to a default CreateACLsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*CreateACLsRequest) AppendTo ¶
func (v *CreateACLsRequest) AppendTo(dst []byte) []byte
func (*CreateACLsRequest) Default ¶
func (v *CreateACLsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateACLsRequest.
func (*CreateACLsRequest) GetVersion ¶
func (v *CreateACLsRequest) GetVersion() int16
func (*CreateACLsRequest) IsFlexible ¶
func (v *CreateACLsRequest) IsFlexible() bool
func (*CreateACLsRequest) Key ¶
func (*CreateACLsRequest) Key() int16
func (*CreateACLsRequest) MaxVersion ¶
func (*CreateACLsRequest) MaxVersion() int16
func (*CreateACLsRequest) ReadFrom ¶
func (v *CreateACLsRequest) ReadFrom(src []byte) error
func (*CreateACLsRequest) RequestWith ¶
func (v *CreateACLsRequest) RequestWith(ctx context.Context, r Requestor) (*CreateACLsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*CreateACLsRequest) ResponseKind ¶
func (v *CreateACLsRequest) ResponseKind() Response
func (*CreateACLsRequest) SetVersion ¶
func (v *CreateACLsRequest) SetVersion(version int16)
type CreateACLsRequestCreation ¶
type CreateACLsRequestCreation struct { // ResourceType is the type of resource this acl entry will be on. // It is invalid to use UNKNOWN or ANY. ResourceType ACLResourceType // ResourceName is the name of the resource this acl entry will be on. // For CLUSTER, this must be "kafka-cluster". ResourceName string // ResourcePatternType is the pattern type to use for the resource name. // This cannot be UNKNOWN or MATCH (i.e. this must be LITERAL or PREFIXED). // The default for pre-Kafka 2.0.0 is effectively LITERAL. ResourcePatternType ACLResourcePatternType // v1+ // Principal is the user to apply this acl for. With the Kafka simple // authorizer, this must begin with "User:". Principal string // Host is the host address to use for this acl. Yes, each host to allow // the principal access from must be specified as a new creation. KIP-252 // might solve this someday. The special wildcard host "*" allows all hosts. Host string // Operation is the operation this acl is for. This must not be UNKNOWN or // ANY. Operation ACLOperation // PermissionType is the permission of this acl. This must be either ALLOW // or DENY. PermissionType ACLPermissionType }
func NewCreateACLsRequestCreation ¶
func NewCreateACLsRequestCreation() CreateACLsRequestCreation
NewCreateACLsRequestCreation returns a default CreateACLsRequestCreation This is a shortcut for creating a struct and calling Default yourself.
func (*CreateACLsRequestCreation) Default ¶
func (v *CreateACLsRequestCreation) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateACLsRequestCreation.
type CreateACLsResponse ¶
type CreateACLsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Results contains responses to each creation request. Results []CreateACLsResponseResult }
CreateACLsResponse is a response for a CreateACLsRequest.
func NewCreateACLsResponse ¶
func NewCreateACLsResponse() CreateACLsResponse
NewCreateACLsResponse returns a default CreateACLsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrCreateACLsResponse ¶
func NewPtrCreateACLsResponse() *CreateACLsResponse
NewPtrCreateACLsResponse returns a pointer to a default CreateACLsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*CreateACLsResponse) AppendTo ¶
func (v *CreateACLsResponse) AppendTo(dst []byte) []byte
func (*CreateACLsResponse) Default ¶
func (v *CreateACLsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateACLsResponse.
func (*CreateACLsResponse) GetVersion ¶
func (v *CreateACLsResponse) GetVersion() int16
func (*CreateACLsResponse) IsFlexible ¶
func (v *CreateACLsResponse) IsFlexible() bool
func (*CreateACLsResponse) Key ¶
func (*CreateACLsResponse) Key() int16
func (*CreateACLsResponse) MaxVersion ¶
func (*CreateACLsResponse) MaxVersion() int16
func (*CreateACLsResponse) ReadFrom ¶
func (v *CreateACLsResponse) ReadFrom(src []byte) error
func (*CreateACLsResponse) RequestKind ¶
func (v *CreateACLsResponse) RequestKind() Request
func (*CreateACLsResponse) SetVersion ¶
func (v *CreateACLsResponse) SetVersion(version int16)
func (*CreateACLsResponse) Throttle ¶ added in v0.6.2
func (v *CreateACLsResponse) Throttle() (int32, bool)
type CreateACLsResponseResult ¶
type CreateACLsResponseResult struct { // ErrorCode is an error for this particular creation (index wise). ErrorCode int16 // ErrorMessage is a message for this error. ErrorMessage *string }
func NewCreateACLsResponseResult ¶
func NewCreateACLsResponseResult() CreateACLsResponseResult
NewCreateACLsResponseResult returns a default CreateACLsResponseResult This is a shortcut for creating a struct and calling Default yourself.
func (*CreateACLsResponseResult) Default ¶
func (v *CreateACLsResponseResult) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateACLsResponseResult.
type CreateDelegationTokenRequest ¶
type CreateDelegationTokenRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Renewers is a list of who can renew this delegation token. If empty, the // default is the principal (user) who created the token. Renewers []CreateDelegationTokenRequestRenewer // MaxLifetimeMillis is how long this delegation token will be valid for. // If -1, the default will be the server's delegation.token.max.lifetime.ms. MaxLifetimeMillis int64 }
CreateDelegationTokenRequest issues a request to create a delegation token.
Creating delegation tokens allows for an (ideally) quicker and easier method of enabling authorization for a wide array of clients. Rather than having to manage many passwords external to Kafka, you only need to manage a few accounts and use those to create delegation tokens per client.
Note that delegation tokens inherit the same ACLs as the user creating the token. Thus, if you want to properly scope ACLs, you should not create delegation tokens with admin accounts.
Delegation tokens live inside of Kafka and use SASL SCRAM-SHA-256 for authorization.
func NewCreateDelegationTokenRequest ¶
func NewCreateDelegationTokenRequest() CreateDelegationTokenRequest
NewCreateDelegationTokenRequest returns a default CreateDelegationTokenRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrCreateDelegationTokenRequest ¶
func NewPtrCreateDelegationTokenRequest() *CreateDelegationTokenRequest
NewPtrCreateDelegationTokenRequest returns a pointer to a default CreateDelegationTokenRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*CreateDelegationTokenRequest) AppendTo ¶
func (v *CreateDelegationTokenRequest) AppendTo(dst []byte) []byte
func (*CreateDelegationTokenRequest) Default ¶
func (v *CreateDelegationTokenRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateDelegationTokenRequest.
func (*CreateDelegationTokenRequest) GetVersion ¶
func (v *CreateDelegationTokenRequest) GetVersion() int16
func (*CreateDelegationTokenRequest) IsFlexible ¶
func (v *CreateDelegationTokenRequest) IsFlexible() bool
func (*CreateDelegationTokenRequest) Key ¶
func (*CreateDelegationTokenRequest) Key() int16
func (*CreateDelegationTokenRequest) MaxVersion ¶
func (*CreateDelegationTokenRequest) MaxVersion() int16
func (*CreateDelegationTokenRequest) ReadFrom ¶
func (v *CreateDelegationTokenRequest) ReadFrom(src []byte) error
func (*CreateDelegationTokenRequest) RequestWith ¶
func (v *CreateDelegationTokenRequest) RequestWith(ctx context.Context, r Requestor) (*CreateDelegationTokenResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*CreateDelegationTokenRequest) ResponseKind ¶
func (v *CreateDelegationTokenRequest) ResponseKind() Response
func (*CreateDelegationTokenRequest) SetVersion ¶
func (v *CreateDelegationTokenRequest) SetVersion(version int16)
type CreateDelegationTokenRequestRenewer ¶
type CreateDelegationTokenRequestRenewer struct { // PrincipalType is the "type" this principal is. This must be "User". PrincipalType string // PrincipalName is the user name allowed to renew the returned token. PrincipalName string }
func NewCreateDelegationTokenRequestRenewer ¶
func NewCreateDelegationTokenRequestRenewer() CreateDelegationTokenRequestRenewer
NewCreateDelegationTokenRequestRenewer returns a default CreateDelegationTokenRequestRenewer This is a shortcut for creating a struct and calling Default yourself.
func (*CreateDelegationTokenRequestRenewer) Default ¶
func (v *CreateDelegationTokenRequestRenewer) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateDelegationTokenRequestRenewer.
type CreateDelegationTokenResponse ¶
type CreateDelegationTokenResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ErrorCode is any error that caused the request to fail. ErrorCode int16 // PrincipalType is the type of principal that granted this delegation token. // This will always be "User" with the simple authorizer. PrincipalType string // PrincipalName is the name of the principal that granted this delegation // token. PrincipalName string // IssueTimestamp is the millisecond timestamp this delegation token was // issued. IssueTimestamp int64 // ExpiryTimestamp is the millisecond timestamp this token will expire. The // token can be renewed up to MaxTimestamp, past which point, it will be // invalid. The Kafka default is 24h. ExpiryTimestamp int64 // MaxTimestamp is the millisecond timestamp past which this token cannot // be renewed. MaxTimestamp int64 // TokenID is the ID of this token; this will be used as the username for // scram authentication. TokenID string // HMAC is the password of this token; this will be used as the password for // scram authentication. HMAC []byte // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 }
CreateDelegationTokenResponse is a response to a CreateDelegationTokenRequest.
func NewCreateDelegationTokenResponse ¶
func NewCreateDelegationTokenResponse() CreateDelegationTokenResponse
NewCreateDelegationTokenResponse returns a default CreateDelegationTokenResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrCreateDelegationTokenResponse ¶
func NewPtrCreateDelegationTokenResponse() *CreateDelegationTokenResponse
NewPtrCreateDelegationTokenResponse returns a pointer to a default CreateDelegationTokenResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*CreateDelegationTokenResponse) AppendTo ¶
func (v *CreateDelegationTokenResponse) AppendTo(dst []byte) []byte
func (*CreateDelegationTokenResponse) Default ¶
func (v *CreateDelegationTokenResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateDelegationTokenResponse.
func (*CreateDelegationTokenResponse) GetVersion ¶
func (v *CreateDelegationTokenResponse) GetVersion() int16
func (*CreateDelegationTokenResponse) IsFlexible ¶
func (v *CreateDelegationTokenResponse) IsFlexible() bool
func (*CreateDelegationTokenResponse) Key ¶
func (*CreateDelegationTokenResponse) Key() int16
func (*CreateDelegationTokenResponse) MaxVersion ¶
func (*CreateDelegationTokenResponse) MaxVersion() int16
func (*CreateDelegationTokenResponse) ReadFrom ¶
func (v *CreateDelegationTokenResponse) ReadFrom(src []byte) error
func (*CreateDelegationTokenResponse) RequestKind ¶
func (v *CreateDelegationTokenResponse) RequestKind() Request
func (*CreateDelegationTokenResponse) SetVersion ¶
func (v *CreateDelegationTokenResponse) SetVersion(version int16)
func (*CreateDelegationTokenResponse) Throttle ¶ added in v0.6.2
func (v *CreateDelegationTokenResponse) Throttle() (int32, bool)
type CreatePartitionsRequest ¶
type CreatePartitionsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Topics contains topics to create partitions for. Topics []CreatePartitionsRequestTopic // TimeoutMillis is how long to allow for this request. TimeoutMillis int32 // ValidateOnly is makes this request a dry-run; everything is validated but // no partitions are actually created. ValidateOnly bool }
CreatePartitionsRequest creates additional partitions for topics.
func NewCreatePartitionsRequest ¶
func NewCreatePartitionsRequest() CreatePartitionsRequest
NewCreatePartitionsRequest returns a default CreatePartitionsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrCreatePartitionsRequest ¶
func NewPtrCreatePartitionsRequest() *CreatePartitionsRequest
NewPtrCreatePartitionsRequest returns a pointer to a default CreatePartitionsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*CreatePartitionsRequest) AppendTo ¶
func (v *CreatePartitionsRequest) AppendTo(dst []byte) []byte
func (*CreatePartitionsRequest) Default ¶
func (v *CreatePartitionsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreatePartitionsRequest.
func (*CreatePartitionsRequest) GetVersion ¶
func (v *CreatePartitionsRequest) GetVersion() int16
func (*CreatePartitionsRequest) IsAdminRequest ¶
func (v *CreatePartitionsRequest) IsAdminRequest()
func (*CreatePartitionsRequest) IsFlexible ¶
func (v *CreatePartitionsRequest) IsFlexible() bool
func (*CreatePartitionsRequest) Key ¶
func (*CreatePartitionsRequest) Key() int16
func (*CreatePartitionsRequest) MaxVersion ¶
func (*CreatePartitionsRequest) MaxVersion() int16
func (*CreatePartitionsRequest) ReadFrom ¶
func (v *CreatePartitionsRequest) ReadFrom(src []byte) error
func (*CreatePartitionsRequest) RequestWith ¶
func (v *CreatePartitionsRequest) RequestWith(ctx context.Context, r Requestor) (*CreatePartitionsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*CreatePartitionsRequest) ResponseKind ¶
func (v *CreatePartitionsRequest) ResponseKind() Response
func (*CreatePartitionsRequest) SetVersion ¶
func (v *CreatePartitionsRequest) SetVersion(version int16)
type CreatePartitionsRequestTopic ¶
type CreatePartitionsRequestTopic struct { // Topic is a topic for which to create additional partitions for. Topic string // Count is the final count of partitions this topic must have after this // request. This must be greater than the current number of partitions. Count int32 // Assignment is a two-level array, the first corresponding to new // partitions, the second contining broker IDs for where new partition // replicas should live. // // The second level, the replicas, cannot have duplicate broker IDs (i.e. // you cannot replicate a single partition twice on the same broker). // Additionally, the number of replicas must match the current number of // replicas per partition on the topic. // // The first level's length must be equal to the delta of Count and the // current number of partitions. Assignment []CreatePartitionsRequestTopicAssignment }
func NewCreatePartitionsRequestTopic ¶
func NewCreatePartitionsRequestTopic() CreatePartitionsRequestTopic
NewCreatePartitionsRequestTopic returns a default CreatePartitionsRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*CreatePartitionsRequestTopic) Default ¶
func (v *CreatePartitionsRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreatePartitionsRequestTopic.
type CreatePartitionsRequestTopicAssignment ¶
type CreatePartitionsRequestTopicAssignment struct { // Replicas are replicas to assign a new partition to. Replicas []int32 }
func NewCreatePartitionsRequestTopicAssignment ¶
func NewCreatePartitionsRequestTopicAssignment() CreatePartitionsRequestTopicAssignment
NewCreatePartitionsRequestTopicAssignment returns a default CreatePartitionsRequestTopicAssignment This is a shortcut for creating a struct and calling Default yourself.
func (*CreatePartitionsRequestTopicAssignment) Default ¶
func (v *CreatePartitionsRequestTopicAssignment) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreatePartitionsRequestTopicAssignment.
type CreatePartitionsResponse ¶
type CreatePartitionsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Topics is a response to each topic in the creation request. Topics []CreatePartitionsResponseTopic }
CreatePartitionsResponse is returned from a CreatePartitionsRequest.
func NewCreatePartitionsResponse ¶
func NewCreatePartitionsResponse() CreatePartitionsResponse
NewCreatePartitionsResponse returns a default CreatePartitionsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrCreatePartitionsResponse ¶
func NewPtrCreatePartitionsResponse() *CreatePartitionsResponse
NewPtrCreatePartitionsResponse returns a pointer to a default CreatePartitionsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*CreatePartitionsResponse) AppendTo ¶
func (v *CreatePartitionsResponse) AppendTo(dst []byte) []byte
func (*CreatePartitionsResponse) Default ¶
func (v *CreatePartitionsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreatePartitionsResponse.
func (*CreatePartitionsResponse) GetVersion ¶
func (v *CreatePartitionsResponse) GetVersion() int16
func (*CreatePartitionsResponse) IsFlexible ¶
func (v *CreatePartitionsResponse) IsFlexible() bool
func (*CreatePartitionsResponse) Key ¶
func (*CreatePartitionsResponse) Key() int16
func (*CreatePartitionsResponse) MaxVersion ¶
func (*CreatePartitionsResponse) MaxVersion() int16
func (*CreatePartitionsResponse) ReadFrom ¶
func (v *CreatePartitionsResponse) ReadFrom(src []byte) error
func (*CreatePartitionsResponse) RequestKind ¶
func (v *CreatePartitionsResponse) RequestKind() Request
func (*CreatePartitionsResponse) SetVersion ¶
func (v *CreatePartitionsResponse) SetVersion(version int16)
func (*CreatePartitionsResponse) Throttle ¶ added in v0.6.2
func (v *CreatePartitionsResponse) Throttle() (int32, bool)
type CreatePartitionsResponseTopic ¶
type CreatePartitionsResponseTopic struct { // Topic is the topic that partitions were requested to be made for. Topic string // ErrorCode is the error code returned for each topic in the request. // // NOT_CONTROLLER is returned if the request was not issued to a Kafka // controller. // // TOPIC_AUTHORIZATION_FAILED is returned if the client is not authorized // to create partitions for a topic. // // INVALID_REQUEST is returned for duplicate topics in the request. // // INVALID_TOPIC_EXCEPTION is returned if the topic is queued for deletion. // // REASSIGNMENT_IN_PROGRESS is returned if the request was issued while // partitions were being reassigned. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of // the topic for which to create partitions. // // INVALID_PARTITIONS is returned if the request would drop the total // count of partitions down, or if the request would not add any more // partitions, or if the request uses unknown brokers, or if the request // assigns a different number of brokers than the increase in the // partition count. ErrorCode int16 // ErrorMessage is an informative message if the topic creation failed. ErrorMessage *string }
func NewCreatePartitionsResponseTopic ¶
func NewCreatePartitionsResponseTopic() CreatePartitionsResponseTopic
NewCreatePartitionsResponseTopic returns a default CreatePartitionsResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*CreatePartitionsResponseTopic) Default ¶
func (v *CreatePartitionsResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreatePartitionsResponseTopic.
type CreateTopicsRequest ¶
type CreateTopicsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Topics is an array of topics to attempt to create. Topics []CreateTopicsRequestTopic // TimeoutMillis is how long to allow for this request. TimeoutMillis int32 // ValidateOnly is makes this request a dry-run; everything is validated but // no topics are actually created. ValidateOnly bool // v1+ }
CreateTopicsRequest creates Kafka topics.
Version 4, introduced in Kafka 2.4.0, implies client support for creation defaults. See KIP-464.
Version 5, also in 2.4.0, returns topic configs in the response (KIP-525).
func NewCreateTopicsRequest ¶
func NewCreateTopicsRequest() CreateTopicsRequest
NewCreateTopicsRequest returns a default CreateTopicsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrCreateTopicsRequest ¶
func NewPtrCreateTopicsRequest() *CreateTopicsRequest
NewPtrCreateTopicsRequest returns a pointer to a default CreateTopicsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*CreateTopicsRequest) AppendTo ¶
func (v *CreateTopicsRequest) AppendTo(dst []byte) []byte
func (*CreateTopicsRequest) Default ¶
func (v *CreateTopicsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateTopicsRequest.
func (*CreateTopicsRequest) GetVersion ¶
func (v *CreateTopicsRequest) GetVersion() int16
func (*CreateTopicsRequest) IsAdminRequest ¶
func (v *CreateTopicsRequest) IsAdminRequest()
func (*CreateTopicsRequest) IsFlexible ¶
func (v *CreateTopicsRequest) IsFlexible() bool
func (*CreateTopicsRequest) Key ¶
func (*CreateTopicsRequest) Key() int16
func (*CreateTopicsRequest) MaxVersion ¶
func (*CreateTopicsRequest) MaxVersion() int16
func (*CreateTopicsRequest) ReadFrom ¶
func (v *CreateTopicsRequest) ReadFrom(src []byte) error
func (*CreateTopicsRequest) RequestWith ¶
func (v *CreateTopicsRequest) RequestWith(ctx context.Context, r Requestor) (*CreateTopicsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*CreateTopicsRequest) ResponseKind ¶
func (v *CreateTopicsRequest) ResponseKind() Response
func (*CreateTopicsRequest) SetVersion ¶
func (v *CreateTopicsRequest) SetVersion(version int16)
type CreateTopicsRequestTopic ¶
type CreateTopicsRequestTopic struct { // Topic is a topic to create. Topic string // NumPartitions is how many partitions to give a topic. This must // be -1 if specifying partitions manually (see ReplicaAssignment) // or, starting v4+, to use the broker default partitions. NumPartitions int32 // ReplicationFactor is how many replicas every partition must have. // This must be -1 if specifying partitions manually (see ReplicaAssignment) // or, starting v4+, to use the broker default replication factor. ReplicationFactor int16 // ReplicaAssignment is an array to manually dicate replicas and their // partitions for a topic. If using this, both ReplicationFactor and // NumPartitions must be -1. ReplicaAssignment []CreateTopicsRequestTopicReplicaAssignment // Configs is an array of key value config pairs for a topic. // These correspond to Kafka Topic-Level Configs: http://kafka.apache.org/documentation/#topicconfigs. Configs []CreateTopicsRequestTopicConfig }
func NewCreateTopicsRequestTopic ¶
func NewCreateTopicsRequestTopic() CreateTopicsRequestTopic
NewCreateTopicsRequestTopic returns a default CreateTopicsRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*CreateTopicsRequestTopic) Default ¶
func (v *CreateTopicsRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateTopicsRequestTopic.
type CreateTopicsRequestTopicConfig ¶
type CreateTopicsRequestTopicConfig struct { // Name is a topic level config key (e.g. segment.bytes). Name string // Value is a topic level config value (e.g. 1073741824) Value *string }
func NewCreateTopicsRequestTopicConfig ¶
func NewCreateTopicsRequestTopicConfig() CreateTopicsRequestTopicConfig
NewCreateTopicsRequestTopicConfig returns a default CreateTopicsRequestTopicConfig This is a shortcut for creating a struct and calling Default yourself.
func (*CreateTopicsRequestTopicConfig) Default ¶
func (v *CreateTopicsRequestTopicConfig) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateTopicsRequestTopicConfig.
type CreateTopicsRequestTopicReplicaAssignment ¶
type CreateTopicsRequestTopicReplicaAssignment struct { // Partition is a partition to create. Partition int32 // Replicas are broker IDs the partition must exist on. Replicas []int32 }
func NewCreateTopicsRequestTopicReplicaAssignment ¶
func NewCreateTopicsRequestTopicReplicaAssignment() CreateTopicsRequestTopicReplicaAssignment
NewCreateTopicsRequestTopicReplicaAssignment returns a default CreateTopicsRequestTopicReplicaAssignment This is a shortcut for creating a struct and calling Default yourself.
func (*CreateTopicsRequestTopicReplicaAssignment) Default ¶
func (v *CreateTopicsRequestTopicReplicaAssignment) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateTopicsRequestTopicReplicaAssignment.
type CreateTopicsResponse ¶
type CreateTopicsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 3. ThrottleMillis int32 // v2+ // Topics contains responses to the requested topic creations. Topics []CreateTopicsResponseTopic }
CreateTopicsResponse is returned from a CreateTopicsRequest.
func NewCreateTopicsResponse ¶
func NewCreateTopicsResponse() CreateTopicsResponse
NewCreateTopicsResponse returns a default CreateTopicsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrCreateTopicsResponse ¶
func NewPtrCreateTopicsResponse() *CreateTopicsResponse
NewPtrCreateTopicsResponse returns a pointer to a default CreateTopicsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*CreateTopicsResponse) AppendTo ¶
func (v *CreateTopicsResponse) AppendTo(dst []byte) []byte
func (*CreateTopicsResponse) Default ¶
func (v *CreateTopicsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateTopicsResponse.
func (*CreateTopicsResponse) GetVersion ¶
func (v *CreateTopicsResponse) GetVersion() int16
func (*CreateTopicsResponse) IsFlexible ¶
func (v *CreateTopicsResponse) IsFlexible() bool
func (*CreateTopicsResponse) Key ¶
func (*CreateTopicsResponse) Key() int16
func (*CreateTopicsResponse) MaxVersion ¶
func (*CreateTopicsResponse) MaxVersion() int16
func (*CreateTopicsResponse) ReadFrom ¶
func (v *CreateTopicsResponse) ReadFrom(src []byte) error
func (*CreateTopicsResponse) RequestKind ¶
func (v *CreateTopicsResponse) RequestKind() Request
func (*CreateTopicsResponse) SetVersion ¶
func (v *CreateTopicsResponse) SetVersion(version int16)
func (*CreateTopicsResponse) Throttle ¶ added in v0.6.2
func (v *CreateTopicsResponse) Throttle() (int32, bool)
type CreateTopicsResponseTopic ¶
type CreateTopicsResponseTopic struct { // Topic is the topic this response corresponds to. Topic string // The unique topic ID. TopicID [16]byte // v7+ // ErrorCode is the error code for an individual topic creation. // // NOT_CONTROLLER is returned if the request was not issued to a Kafka // controller. // // TOPIC_AUTHORIZATION_FAILED is returned if the client is not authorized // // INVALID_REQUEST is returned if the same topic occurred multiple times // in the request. // // POLICY_VIOLATION is returned if the broker is using a // create.topic.policy.class.name that returns a policy violation. // // INVALID_TOPIC_EXCEPTION if the topic collides with another topic when // both topic's names' periods are replaced with underscores (e.g. // topic.foo and topic_foo collide). // // TOPIC_ALREADY_EXISTS is returned if the topic already exists. // // INVALID_PARTITIONS is returned if the requested number of partitions is // <= 0. // // INVALID_REPLICATION_FACTOR is returned if the requested replication // factor is <= 0. // // INVALID_REPLICA_ASSIGNMENT is returned if not all partitions have the same // number of replicas, or duplica replicas are assigned, or the partitions // are not consecutive starting from 0. // // INVALID_CONFIG is returned if the requested topic config is invalid. // to create a topic. ErrorCode int16 // ErrorMessage is an informative message if the topic creation failed. ErrorMessage *string // v1+ // ConfigErrorCode is non-zero if configs are unable to be returned. // // This is the first tagged field, introduced in version 5. As such, it is // only possible to be present in v5+. ConfigErrorCode int16 // tag 0 // NumPartitions is how many partitions were created for this topic. NumPartitions int32 // v5+ // ReplicationFactor is how many replicas every partition has for this topic. ReplicationFactor int16 // v5+ // Configs contains this topic's configuration. Configs []CreateTopicsResponseTopicConfig // v5+ }
func NewCreateTopicsResponseTopic ¶
func NewCreateTopicsResponseTopic() CreateTopicsResponseTopic
NewCreateTopicsResponseTopic returns a default CreateTopicsResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*CreateTopicsResponseTopic) Default ¶
func (v *CreateTopicsResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateTopicsResponseTopic.
type CreateTopicsResponseTopicConfig ¶
type CreateTopicsResponseTopicConfig struct { // Name is the configuration name (e.g. segment.bytes). Name string // Value is the value for this config key. If the key is sensitive, // the value will be null. Value *string // ReadOnly signifies whether this is not a dynamic config option. ReadOnly bool // Source is where this config entry is from. See the documentation // on DescribeConfigsRequest's Source for more details. Source int8 // IsSensitive signifies whether this is a sensitive config key, which // is either a password or an unknown type. IsSensitive bool }
func NewCreateTopicsResponseTopicConfig ¶
func NewCreateTopicsResponseTopicConfig() CreateTopicsResponseTopicConfig
NewCreateTopicsResponseTopicConfig returns a default CreateTopicsResponseTopicConfig This is a shortcut for creating a struct and calling Default yourself.
func (*CreateTopicsResponseTopicConfig) Default ¶
func (v *CreateTopicsResponseTopicConfig) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to CreateTopicsResponseTopicConfig.
type DefaultPrincipalData ¶ added in v0.6.2
type DefaultPrincipalData struct { Version int16 // The principal type. Type string // The principal name. Name string // Whether the principal was authenticated by a delegation token on the forwarding broker. TokenAuthenticated bool }
DefaultPrincipalData is the encoded principal data. This is used in an envelope request from broker to broker.
func NewDefaultPrincipalData ¶ added in v0.6.2
func NewDefaultPrincipalData() DefaultPrincipalData
NewDefaultPrincipalData returns a default DefaultPrincipalData This is a shortcut for creating a struct and calling Default yourself.
func (*DefaultPrincipalData) AppendTo ¶ added in v0.6.2
func (v *DefaultPrincipalData) AppendTo(dst []byte) []byte
func (*DefaultPrincipalData) Default ¶ added in v0.6.2
func (v *DefaultPrincipalData) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DefaultPrincipalData.
func (*DefaultPrincipalData) IsFlexible ¶ added in v0.6.2
func (v *DefaultPrincipalData) IsFlexible() bool
func (*DefaultPrincipalData) ReadFrom ¶ added in v0.6.2
func (v *DefaultPrincipalData) ReadFrom(src []byte) error
type DeleteACLsRequest ¶
type DeleteACLsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Filters are filters for acls to delete. Filters []DeleteACLsRequestFilter }
DeleteACLsRequest deletes acls. This request works on filters the same way that DescribeACLsRequest does. See DescribeACLsRequest for documentation of the fields.
func NewDeleteACLsRequest ¶
func NewDeleteACLsRequest() DeleteACLsRequest
NewDeleteACLsRequest returns a default DeleteACLsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDeleteACLsRequest ¶
func NewPtrDeleteACLsRequest() *DeleteACLsRequest
NewPtrDeleteACLsRequest returns a pointer to a default DeleteACLsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DeleteACLsRequest) AppendTo ¶
func (v *DeleteACLsRequest) AppendTo(dst []byte) []byte
func (*DeleteACLsRequest) Default ¶
func (v *DeleteACLsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteACLsRequest.
func (*DeleteACLsRequest) GetVersion ¶
func (v *DeleteACLsRequest) GetVersion() int16
func (*DeleteACLsRequest) IsFlexible ¶
func (v *DeleteACLsRequest) IsFlexible() bool
func (*DeleteACLsRequest) Key ¶
func (*DeleteACLsRequest) Key() int16
func (*DeleteACLsRequest) MaxVersion ¶
func (*DeleteACLsRequest) MaxVersion() int16
func (*DeleteACLsRequest) ReadFrom ¶
func (v *DeleteACLsRequest) ReadFrom(src []byte) error
func (*DeleteACLsRequest) RequestWith ¶
func (v *DeleteACLsRequest) RequestWith(ctx context.Context, r Requestor) (*DeleteACLsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DeleteACLsRequest) ResponseKind ¶
func (v *DeleteACLsRequest) ResponseKind() Response
func (*DeleteACLsRequest) SetVersion ¶
func (v *DeleteACLsRequest) SetVersion(version int16)
type DeleteACLsRequestFilter ¶
type DeleteACLsRequestFilter struct { ResourceType ACLResourceType ResourceName *string ResourcePatternType ACLResourcePatternType // v1+ Principal *string Host *string Operation ACLOperation PermissionType ACLPermissionType }
func NewDeleteACLsRequestFilter ¶
func NewDeleteACLsRequestFilter() DeleteACLsRequestFilter
NewDeleteACLsRequestFilter returns a default DeleteACLsRequestFilter This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteACLsRequestFilter) Default ¶
func (v *DeleteACLsRequestFilter) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteACLsRequestFilter.
type DeleteACLsResponse ¶
type DeleteACLsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Results contains a response to each requested filter. Results []DeleteACLsResponseResult }
DeleteACLsResponse is a response for a DeleteACLsRequest.
func NewDeleteACLsResponse ¶
func NewDeleteACLsResponse() DeleteACLsResponse
NewDeleteACLsResponse returns a default DeleteACLsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDeleteACLsResponse ¶
func NewPtrDeleteACLsResponse() *DeleteACLsResponse
NewPtrDeleteACLsResponse returns a pointer to a default DeleteACLsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DeleteACLsResponse) AppendTo ¶
func (v *DeleteACLsResponse) AppendTo(dst []byte) []byte
func (*DeleteACLsResponse) Default ¶
func (v *DeleteACLsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteACLsResponse.
func (*DeleteACLsResponse) GetVersion ¶
func (v *DeleteACLsResponse) GetVersion() int16
func (*DeleteACLsResponse) IsFlexible ¶
func (v *DeleteACLsResponse) IsFlexible() bool
func (*DeleteACLsResponse) Key ¶
func (*DeleteACLsResponse) Key() int16
func (*DeleteACLsResponse) MaxVersion ¶
func (*DeleteACLsResponse) MaxVersion() int16
func (*DeleteACLsResponse) ReadFrom ¶
func (v *DeleteACLsResponse) ReadFrom(src []byte) error
func (*DeleteACLsResponse) RequestKind ¶
func (v *DeleteACLsResponse) RequestKind() Request
func (*DeleteACLsResponse) SetVersion ¶
func (v *DeleteACLsResponse) SetVersion(version int16)
func (*DeleteACLsResponse) Throttle ¶ added in v0.6.2
func (v *DeleteACLsResponse) Throttle() (int32, bool)
type DeleteACLsResponseResult ¶
type DeleteACLsResponseResult struct { // ErrorCode is the overall error code for this individual filter. ErrorCode int16 // ErrorMessage is a message for this error. ErrorMessage *string // MatchingACLs contains all acls that were matched for this filter. MatchingACLs []DeleteACLsResponseResultMatchingACL }
func NewDeleteACLsResponseResult ¶
func NewDeleteACLsResponseResult() DeleteACLsResponseResult
NewDeleteACLsResponseResult returns a default DeleteACLsResponseResult This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteACLsResponseResult) Default ¶
func (v *DeleteACLsResponseResult) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteACLsResponseResult.
type DeleteACLsResponseResultMatchingACL ¶
type DeleteACLsResponseResultMatchingACL struct { // ErrorCode contains an error for this individual acl for this filter. ErrorCode int16 // ErrorMessage is a message for this error. ErrorMessage *string ResourceType ACLResourceType ResourceName string ResourcePatternType ACLResourcePatternType // v1+ Principal string Host string Operation ACLOperation PermissionType ACLPermissionType }
func NewDeleteACLsResponseResultMatchingACL ¶
func NewDeleteACLsResponseResultMatchingACL() DeleteACLsResponseResultMatchingACL
NewDeleteACLsResponseResultMatchingACL returns a default DeleteACLsResponseResultMatchingACL This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteACLsResponseResultMatchingACL) Default ¶
func (v *DeleteACLsResponseResultMatchingACL) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteACLsResponseResultMatchingACL.
type DeleteGroupsRequest ¶
type DeleteGroupsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Groups is a list of groups to delete. Groups []string }
DeleteGroupsRequest deletes consumer groups. This request was added for Kafka 1.1.0 corresponding to the removal of RetentionTimeMillis from OffsetCommitRequest. See KIP-229 for more details.
func NewDeleteGroupsRequest ¶
func NewDeleteGroupsRequest() DeleteGroupsRequest
NewDeleteGroupsRequest returns a default DeleteGroupsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDeleteGroupsRequest ¶
func NewPtrDeleteGroupsRequest() *DeleteGroupsRequest
NewPtrDeleteGroupsRequest returns a pointer to a default DeleteGroupsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DeleteGroupsRequest) AppendTo ¶
func (v *DeleteGroupsRequest) AppendTo(dst []byte) []byte
func (*DeleteGroupsRequest) Default ¶
func (v *DeleteGroupsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteGroupsRequest.
func (*DeleteGroupsRequest) GetVersion ¶
func (v *DeleteGroupsRequest) GetVersion() int16
func (*DeleteGroupsRequest) IsFlexible ¶
func (v *DeleteGroupsRequest) IsFlexible() bool
func (*DeleteGroupsRequest) IsGroupCoordinatorRequest ¶
func (v *DeleteGroupsRequest) IsGroupCoordinatorRequest()
func (*DeleteGroupsRequest) Key ¶
func (*DeleteGroupsRequest) Key() int16
func (*DeleteGroupsRequest) MaxVersion ¶
func (*DeleteGroupsRequest) MaxVersion() int16
func (*DeleteGroupsRequest) ReadFrom ¶
func (v *DeleteGroupsRequest) ReadFrom(src []byte) error
func (*DeleteGroupsRequest) RequestWith ¶
func (v *DeleteGroupsRequest) RequestWith(ctx context.Context, r Requestor) (*DeleteGroupsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DeleteGroupsRequest) ResponseKind ¶
func (v *DeleteGroupsRequest) ResponseKind() Response
func (*DeleteGroupsRequest) SetVersion ¶
func (v *DeleteGroupsRequest) SetVersion(version int16)
type DeleteGroupsResponse ¶
type DeleteGroupsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Groups are the responses to each group requested for deletion. Groups []DeleteGroupsResponseGroup }
DeleteGroupsResponse is returned from a DeleteGroupsRequest.
func NewDeleteGroupsResponse ¶
func NewDeleteGroupsResponse() DeleteGroupsResponse
NewDeleteGroupsResponse returns a default DeleteGroupsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDeleteGroupsResponse ¶
func NewPtrDeleteGroupsResponse() *DeleteGroupsResponse
NewPtrDeleteGroupsResponse returns a pointer to a default DeleteGroupsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DeleteGroupsResponse) AppendTo ¶
func (v *DeleteGroupsResponse) AppendTo(dst []byte) []byte
func (*DeleteGroupsResponse) Default ¶
func (v *DeleteGroupsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteGroupsResponse.
func (*DeleteGroupsResponse) GetVersion ¶
func (v *DeleteGroupsResponse) GetVersion() int16
func (*DeleteGroupsResponse) IsFlexible ¶
func (v *DeleteGroupsResponse) IsFlexible() bool
func (*DeleteGroupsResponse) Key ¶
func (*DeleteGroupsResponse) Key() int16
func (*DeleteGroupsResponse) MaxVersion ¶
func (*DeleteGroupsResponse) MaxVersion() int16
func (*DeleteGroupsResponse) ReadFrom ¶
func (v *DeleteGroupsResponse) ReadFrom(src []byte) error
func (*DeleteGroupsResponse) RequestKind ¶
func (v *DeleteGroupsResponse) RequestKind() Request
func (*DeleteGroupsResponse) SetVersion ¶
func (v *DeleteGroupsResponse) SetVersion(version int16)
func (*DeleteGroupsResponse) Throttle ¶ added in v0.6.2
func (v *DeleteGroupsResponse) Throttle() (int32, bool)
type DeleteGroupsResponseGroup ¶
type DeleteGroupsResponseGroup struct { // Group is a group ID requested for deletion. Group string // ErrorCode is the error code returned for this group's deletion request. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to delete a group. // // INVALID_GROUP_ID is returned if the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator for this // group is not yet active. // // GROUP_ID_NOT_FOUND is returned if the group ID does not exist. // // NON_EMPTY_GROUP is returned if attempting to delete a group that is // not in the empty state. ErrorCode int16 }
func NewDeleteGroupsResponseGroup ¶
func NewDeleteGroupsResponseGroup() DeleteGroupsResponseGroup
NewDeleteGroupsResponseGroup returns a default DeleteGroupsResponseGroup This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteGroupsResponseGroup) Default ¶
func (v *DeleteGroupsResponseGroup) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteGroupsResponseGroup.
type DeleteRecordsRequest ¶
type DeleteRecordsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Topics contains topics for which to delete records from. Topics []DeleteRecordsRequestTopic // TimeoutMillis is how long to wait for a response before Kafka will return. // Kafka waits for all replicas to respond to the delete reords request; // any partition that all replicas do not reply to within this limit will // have a timeout error. TimeoutMillis int32 }
DeleteRecordsRequest is an admin request to delete records from Kafka. This was added for KIP-107.
To delete records, Kafka sets the LastStableOffset for partitions to the requested offset. All segments whose max partition is before the requested offset are deleted, and any records within the segment before the requested offset can no longer be read.
This request must be issued to the correct brokers that own the partitions you intend to delete records for.
func NewDeleteRecordsRequest ¶
func NewDeleteRecordsRequest() DeleteRecordsRequest
NewDeleteRecordsRequest returns a default DeleteRecordsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDeleteRecordsRequest ¶
func NewPtrDeleteRecordsRequest() *DeleteRecordsRequest
NewPtrDeleteRecordsRequest returns a pointer to a default DeleteRecordsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DeleteRecordsRequest) AppendTo ¶
func (v *DeleteRecordsRequest) AppendTo(dst []byte) []byte
func (*DeleteRecordsRequest) Default ¶
func (v *DeleteRecordsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteRecordsRequest.
func (*DeleteRecordsRequest) GetVersion ¶
func (v *DeleteRecordsRequest) GetVersion() int16
func (*DeleteRecordsRequest) IsFlexible ¶
func (v *DeleteRecordsRequest) IsFlexible() bool
func (*DeleteRecordsRequest) Key ¶
func (*DeleteRecordsRequest) Key() int16
func (*DeleteRecordsRequest) MaxVersion ¶
func (*DeleteRecordsRequest) MaxVersion() int16
func (*DeleteRecordsRequest) ReadFrom ¶
func (v *DeleteRecordsRequest) ReadFrom(src []byte) error
func (*DeleteRecordsRequest) RequestWith ¶
func (v *DeleteRecordsRequest) RequestWith(ctx context.Context, r Requestor) (*DeleteRecordsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DeleteRecordsRequest) ResponseKind ¶
func (v *DeleteRecordsRequest) ResponseKind() Response
func (*DeleteRecordsRequest) SetVersion ¶
func (v *DeleteRecordsRequest) SetVersion(version int16)
type DeleteRecordsRequestTopic ¶
type DeleteRecordsRequestTopic struct { // Topic is a topic to delete records from. Topic string // Partitions contains partitions to delete records from. Partitions []DeleteRecordsRequestTopicPartition }
func NewDeleteRecordsRequestTopic ¶
func NewDeleteRecordsRequestTopic() DeleteRecordsRequestTopic
NewDeleteRecordsRequestTopic returns a default DeleteRecordsRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteRecordsRequestTopic) Default ¶
func (v *DeleteRecordsRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteRecordsRequestTopic.
type DeleteRecordsRequestTopicPartition ¶
type DeleteRecordsRequestTopicPartition struct { // Partition is a partition to delete records from. Partition int32 // Offset is the offset to set the partition's low watermark (start // offset) to. After a successful response, all records before this // offset are considered deleted and are no longer readable. // // To delete all records, use -1, which is mapped to the partition's // current high watermark. Offset int64 }
func NewDeleteRecordsRequestTopicPartition ¶
func NewDeleteRecordsRequestTopicPartition() DeleteRecordsRequestTopicPartition
NewDeleteRecordsRequestTopicPartition returns a default DeleteRecordsRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteRecordsRequestTopicPartition) Default ¶
func (v *DeleteRecordsRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteRecordsRequestTopicPartition.
type DeleteRecordsResponse ¶
type DeleteRecordsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Topics contains responses for each topic in the delete records request. Topics []DeleteRecordsResponseTopic }
DeleteRecordsResponse is returned from a DeleteRecordsRequest.
func NewDeleteRecordsResponse ¶
func NewDeleteRecordsResponse() DeleteRecordsResponse
NewDeleteRecordsResponse returns a default DeleteRecordsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDeleteRecordsResponse ¶
func NewPtrDeleteRecordsResponse() *DeleteRecordsResponse
NewPtrDeleteRecordsResponse returns a pointer to a default DeleteRecordsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DeleteRecordsResponse) AppendTo ¶
func (v *DeleteRecordsResponse) AppendTo(dst []byte) []byte
func (*DeleteRecordsResponse) Default ¶
func (v *DeleteRecordsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteRecordsResponse.
func (*DeleteRecordsResponse) GetVersion ¶
func (v *DeleteRecordsResponse) GetVersion() int16
func (*DeleteRecordsResponse) IsFlexible ¶
func (v *DeleteRecordsResponse) IsFlexible() bool
func (*DeleteRecordsResponse) Key ¶
func (*DeleteRecordsResponse) Key() int16
func (*DeleteRecordsResponse) MaxVersion ¶
func (*DeleteRecordsResponse) MaxVersion() int16
func (*DeleteRecordsResponse) ReadFrom ¶
func (v *DeleteRecordsResponse) ReadFrom(src []byte) error
func (*DeleteRecordsResponse) RequestKind ¶
func (v *DeleteRecordsResponse) RequestKind() Request
func (*DeleteRecordsResponse) SetVersion ¶
func (v *DeleteRecordsResponse) SetVersion(version int16)
func (*DeleteRecordsResponse) Throttle ¶ added in v0.6.2
func (v *DeleteRecordsResponse) Throttle() (int32, bool)
type DeleteRecordsResponseTopic ¶
type DeleteRecordsResponseTopic struct { // Topic is the topic this response corresponds to. Topic string // Partitions contains responses for each partition in a requested topic // in the delete records request. Partitions []DeleteRecordsResponseTopicPartition }
func NewDeleteRecordsResponseTopic ¶
func NewDeleteRecordsResponseTopic() DeleteRecordsResponseTopic
NewDeleteRecordsResponseTopic returns a default DeleteRecordsResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteRecordsResponseTopic) Default ¶
func (v *DeleteRecordsResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteRecordsResponseTopic.
type DeleteRecordsResponseTopicPartition ¶
type DeleteRecordsResponseTopicPartition struct { // Partition is the partition this response corresponds to. Partition int32 // LowWatermark is the new earliest offset for this partition. LowWatermark int64 // ErrorCode is the error code returned for a given partition in // the delete request. // // TOPIC_AUTHORIZATION_FAILED is returned for all partitions if the // client is not authorized to delete records. // // UNKNOWN_TOPIC_OR_PARTITION is returned for all partitions that // the requested broker does not know of. // // NOT_LEADER_FOR_PARTITION is returned for partitions that the // requested broker is not a leader of. // // OFFSET_OUT_OF_RANGE is returned if the requested offset is // negative or higher than the current high watermark. // // POLICY_VIOLATION is returned if records cannot be deleted due to // broker configuration. // // KAFKA_STORAGE_EXCEPTION is returned if the partition is in an // offline log directory. ErrorCode int16 }
func NewDeleteRecordsResponseTopicPartition ¶
func NewDeleteRecordsResponseTopicPartition() DeleteRecordsResponseTopicPartition
NewDeleteRecordsResponseTopicPartition returns a default DeleteRecordsResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteRecordsResponseTopicPartition) Default ¶
func (v *DeleteRecordsResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteRecordsResponseTopicPartition.
type DeleteTopicsRequest ¶
type DeleteTopicsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Topics is an array of topics to delete. TopicNames []string // The name or topic ID of topics to delete. Topics []DeleteTopicsRequestTopic // v6+ // TimeoutMillis is the millisecond timeout of this request. TimeoutMillis int32 }
DeleteTopicsRequest deletes Kafka topics.
func NewDeleteTopicsRequest ¶
func NewDeleteTopicsRequest() DeleteTopicsRequest
NewDeleteTopicsRequest returns a default DeleteTopicsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDeleteTopicsRequest ¶
func NewPtrDeleteTopicsRequest() *DeleteTopicsRequest
NewPtrDeleteTopicsRequest returns a pointer to a default DeleteTopicsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DeleteTopicsRequest) AppendTo ¶
func (v *DeleteTopicsRequest) AppendTo(dst []byte) []byte
func (*DeleteTopicsRequest) Default ¶
func (v *DeleteTopicsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteTopicsRequest.
func (*DeleteTopicsRequest) GetVersion ¶
func (v *DeleteTopicsRequest) GetVersion() int16
func (*DeleteTopicsRequest) IsAdminRequest ¶
func (v *DeleteTopicsRequest) IsAdminRequest()
func (*DeleteTopicsRequest) IsFlexible ¶
func (v *DeleteTopicsRequest) IsFlexible() bool
func (*DeleteTopicsRequest) Key ¶
func (*DeleteTopicsRequest) Key() int16
func (*DeleteTopicsRequest) MaxVersion ¶
func (*DeleteTopicsRequest) MaxVersion() int16
func (*DeleteTopicsRequest) ReadFrom ¶
func (v *DeleteTopicsRequest) ReadFrom(src []byte) error
func (*DeleteTopicsRequest) RequestWith ¶
func (v *DeleteTopicsRequest) RequestWith(ctx context.Context, r Requestor) (*DeleteTopicsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DeleteTopicsRequest) ResponseKind ¶
func (v *DeleteTopicsRequest) ResponseKind() Response
func (*DeleteTopicsRequest) SetVersion ¶
func (v *DeleteTopicsRequest) SetVersion(version int16)
type DeleteTopicsRequestTopic ¶ added in v0.6.4
func NewDeleteTopicsRequestTopic ¶ added in v0.6.4
func NewDeleteTopicsRequestTopic() DeleteTopicsRequestTopic
NewDeleteTopicsRequestTopic returns a default DeleteTopicsRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteTopicsRequestTopic) Default ¶ added in v0.6.4
func (v *DeleteTopicsRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteTopicsRequestTopic.
type DeleteTopicsResponse ¶
type DeleteTopicsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // v1+ // Topics contains responses for each topic requested for deletion. Topics []DeleteTopicsResponseTopic }
DeleteTopicsResponse is returned from a DeleteTopicsRequest. Version 3 added the TOPIC_DELETION_DISABLED error proposed in KIP-322 and introduced in Kafka 2.1.0. Prior, the request timed out.
func NewDeleteTopicsResponse ¶
func NewDeleteTopicsResponse() DeleteTopicsResponse
NewDeleteTopicsResponse returns a default DeleteTopicsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDeleteTopicsResponse ¶
func NewPtrDeleteTopicsResponse() *DeleteTopicsResponse
NewPtrDeleteTopicsResponse returns a pointer to a default DeleteTopicsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DeleteTopicsResponse) AppendTo ¶
func (v *DeleteTopicsResponse) AppendTo(dst []byte) []byte
func (*DeleteTopicsResponse) Default ¶
func (v *DeleteTopicsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteTopicsResponse.
func (*DeleteTopicsResponse) GetVersion ¶
func (v *DeleteTopicsResponse) GetVersion() int16
func (*DeleteTopicsResponse) IsFlexible ¶
func (v *DeleteTopicsResponse) IsFlexible() bool
func (*DeleteTopicsResponse) Key ¶
func (*DeleteTopicsResponse) Key() int16
func (*DeleteTopicsResponse) MaxVersion ¶
func (*DeleteTopicsResponse) MaxVersion() int16
func (*DeleteTopicsResponse) ReadFrom ¶
func (v *DeleteTopicsResponse) ReadFrom(src []byte) error
func (*DeleteTopicsResponse) RequestKind ¶
func (v *DeleteTopicsResponse) RequestKind() Request
func (*DeleteTopicsResponse) SetVersion ¶
func (v *DeleteTopicsResponse) SetVersion(version int16)
func (*DeleteTopicsResponse) Throttle ¶ added in v0.6.2
func (v *DeleteTopicsResponse) Throttle() (int32, bool)
type DeleteTopicsResponseTopic ¶
type DeleteTopicsResponseTopic struct { // Topic is the topic requested for deletion. Topic *string // The topic ID requested for deletion. TopicID [16]byte // v6+ // ErrorCode is the error code returned for an individual topic in // deletion request. // // TOPIC_AUTHORIZATION_FAILED is returned if the client is not authorized // to delete a topic. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of // the topic. // // NOT_CONTROLLER is returned if the request was not issued to a Kafka // controller. // // TOPIC_DELETION_DISABLED is returned for deletion requests version 3+ // and brokers >= 2.1.0. INVALID_REQUEST is issued for request versions // 0-2 against brokers >= 2.1.0. Otherwise, the request hangs until it // times out. // // UNSUPPORTED_VERSION is returned when using topic IDs with a cluster // that is not yet Kafka v2.8+. // // UNKNOWN_TOPIC_ID is returned when using topic IDs to a Kafka cluster // v2.8+ and the topic ID is not found. ErrorCode int16 // ErrorMessage is a message for an error. ErrorMessage *string // v5+ }
func NewDeleteTopicsResponseTopic ¶
func NewDeleteTopicsResponseTopic() DeleteTopicsResponseTopic
NewDeleteTopicsResponseTopic returns a default DeleteTopicsResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DeleteTopicsResponseTopic) Default ¶
func (v *DeleteTopicsResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DeleteTopicsResponseTopic.
type DescribeACLsRequest ¶
type DescribeACLsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // ResourceType is the type of resource to describe. ResourceType ACLResourceType // ResourceName is the name to filter out. For the CLUSTER resource type, // this must be "kafka-cluster". ResourceName *string // ResourcePatternType is how ResourceName is understood. ResourcePatternType ACLResourcePatternType // v1+ // Principal is the user to filter for. In Kafka with the simple authorizor, // all principals begin with "User:". Pluggable authorizors are allowed, but // Kafka still expects principals to lead with a principal type ("User") and // have a colon separating the principal name ("bob" in "User:bob"). Principal *string // Host is a host to filter for. Host *string // Operation is an operation to filter for. // // Note that READ, WRITE, DELETE, and ALTER imply DESCRIBE, and ALTER_CONFIGS // implies DESCRIBE_CONFIGS. Operation ACLOperation // PermissionType is the permission type to filter for. UNKNOWN is 0. PermissionType ACLPermissionType }
DescribeACLsRequest describes ACLs. Describing ACLs works on a filter basis: anything that matches the filter is described. Note that there are two "types" of filters in this request: the resource filter and the entry filter, with entries corresponding to users. The first three fields form the resource filter, the last four the entry filter.
func NewDescribeACLsRequest ¶
func NewDescribeACLsRequest() DescribeACLsRequest
NewDescribeACLsRequest returns a default DescribeACLsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeACLsRequest ¶
func NewPtrDescribeACLsRequest() *DescribeACLsRequest
NewPtrDescribeACLsRequest returns a pointer to a default DescribeACLsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeACLsRequest) AppendTo ¶
func (v *DescribeACLsRequest) AppendTo(dst []byte) []byte
func (*DescribeACLsRequest) Default ¶
func (v *DescribeACLsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeACLsRequest.
func (*DescribeACLsRequest) GetVersion ¶
func (v *DescribeACLsRequest) GetVersion() int16
func (*DescribeACLsRequest) IsFlexible ¶
func (v *DescribeACLsRequest) IsFlexible() bool
func (*DescribeACLsRequest) Key ¶
func (*DescribeACLsRequest) Key() int16
func (*DescribeACLsRequest) MaxVersion ¶
func (*DescribeACLsRequest) MaxVersion() int16
func (*DescribeACLsRequest) ReadFrom ¶
func (v *DescribeACLsRequest) ReadFrom(src []byte) error
func (*DescribeACLsRequest) RequestWith ¶
func (v *DescribeACLsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeACLsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeACLsRequest) ResponseKind ¶
func (v *DescribeACLsRequest) ResponseKind() Response
func (*DescribeACLsRequest) SetVersion ¶
func (v *DescribeACLsRequest) SetVersion(version int16)
type DescribeACLsResponse ¶
type DescribeACLsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // ErrorCode is the error code returned on request failure. // // SECURITY_DISABLED is returned if there is no authorizer configured on the // broker. // // There can be other authorization failures. ErrorCode int16 // ErrorMessage is a message for an error. ErrorMessage *string // Resources are the describe resources. Resources []DescribeACLsResponseResource }
DescribeACLsResponse is a response to a describe acls request.
func NewDescribeACLsResponse ¶
func NewDescribeACLsResponse() DescribeACLsResponse
NewDescribeACLsResponse returns a default DescribeACLsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeACLsResponse ¶
func NewPtrDescribeACLsResponse() *DescribeACLsResponse
NewPtrDescribeACLsResponse returns a pointer to a default DescribeACLsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeACLsResponse) AppendTo ¶
func (v *DescribeACLsResponse) AppendTo(dst []byte) []byte
func (*DescribeACLsResponse) Default ¶
func (v *DescribeACLsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeACLsResponse.
func (*DescribeACLsResponse) GetVersion ¶
func (v *DescribeACLsResponse) GetVersion() int16
func (*DescribeACLsResponse) IsFlexible ¶
func (v *DescribeACLsResponse) IsFlexible() bool
func (*DescribeACLsResponse) Key ¶
func (*DescribeACLsResponse) Key() int16
func (*DescribeACLsResponse) MaxVersion ¶
func (*DescribeACLsResponse) MaxVersion() int16
func (*DescribeACLsResponse) ReadFrom ¶
func (v *DescribeACLsResponse) ReadFrom(src []byte) error
func (*DescribeACLsResponse) RequestKind ¶
func (v *DescribeACLsResponse) RequestKind() Request
func (*DescribeACLsResponse) SetVersion ¶
func (v *DescribeACLsResponse) SetVersion(version int16)
func (*DescribeACLsResponse) Throttle ¶ added in v0.6.2
func (v *DescribeACLsResponse) Throttle() (int32, bool)
type DescribeACLsResponseResource ¶
type DescribeACLsResponseResource struct { // ResourceType is the resource type being described. ResourceType ACLResourceType // ResourceName is the resource name being described. ResourceName string // ResourcePatternType is the pattern type being described. ResourcePatternType ACLResourcePatternType // v1+ // ACLs contains users / entries being described. ACLs []DescribeACLsResponseResourceACL }
func NewDescribeACLsResponseResource ¶
func NewDescribeACLsResponseResource() DescribeACLsResponseResource
NewDescribeACLsResponseResource returns a default DescribeACLsResponseResource This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeACLsResponseResource) Default ¶
func (v *DescribeACLsResponseResource) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeACLsResponseResource.
type DescribeACLsResponseResourceACL ¶
type DescribeACLsResponseResourceACL struct { // Principal is who this ACL applies to. Principal string // Host is on which host this ACL applies. Host string // Operation is the operation being described. Operation ACLOperation // PermissionType is the permission being described. PermissionType ACLPermissionType }
func NewDescribeACLsResponseResourceACL ¶
func NewDescribeACLsResponseResourceACL() DescribeACLsResponseResourceACL
NewDescribeACLsResponseResourceACL returns a default DescribeACLsResponseResourceACL This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeACLsResponseResourceACL) Default ¶
func (v *DescribeACLsResponseResourceACL) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeACLsResponseResourceACL.
type DescribeClientQuotasRequest ¶
type DescribeClientQuotasRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Components is a list of match filters to apply for describing quota entities. Components []DescribeClientQuotasRequestComponent // Strict signifies whether matches are strict; if true, the response // excludes entities with unspecified entity types. Strict bool }
DescribeClientQuotasRequest, proposed in KIP-546 and introduced with Kafka 2.6.0, provides a way to describe client quotas.
func NewDescribeClientQuotasRequest ¶
func NewDescribeClientQuotasRequest() DescribeClientQuotasRequest
NewDescribeClientQuotasRequest returns a default DescribeClientQuotasRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeClientQuotasRequest ¶
func NewPtrDescribeClientQuotasRequest() *DescribeClientQuotasRequest
NewPtrDescribeClientQuotasRequest returns a pointer to a default DescribeClientQuotasRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeClientQuotasRequest) AppendTo ¶
func (v *DescribeClientQuotasRequest) AppendTo(dst []byte) []byte
func (*DescribeClientQuotasRequest) Default ¶
func (v *DescribeClientQuotasRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClientQuotasRequest.
func (*DescribeClientQuotasRequest) GetVersion ¶
func (v *DescribeClientQuotasRequest) GetVersion() int16
func (*DescribeClientQuotasRequest) IsFlexible ¶
func (v *DescribeClientQuotasRequest) IsFlexible() bool
func (*DescribeClientQuotasRequest) Key ¶
func (*DescribeClientQuotasRequest) Key() int16
func (*DescribeClientQuotasRequest) MaxVersion ¶
func (*DescribeClientQuotasRequest) MaxVersion() int16
func (*DescribeClientQuotasRequest) ReadFrom ¶
func (v *DescribeClientQuotasRequest) ReadFrom(src []byte) error
func (*DescribeClientQuotasRequest) RequestWith ¶
func (v *DescribeClientQuotasRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeClientQuotasResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeClientQuotasRequest) ResponseKind ¶
func (v *DescribeClientQuotasRequest) ResponseKind() Response
func (*DescribeClientQuotasRequest) SetVersion ¶
func (v *DescribeClientQuotasRequest) SetVersion(version int16)
type DescribeClientQuotasRequestComponent ¶
type DescribeClientQuotasRequestComponent struct { // EntityType is the entity component type that this filter component // applies to; some possible values are "user" or "client-id". EntityType string // MatchType specifies how to match an entity, // with 0 meaning match on the name exactly, // 1 meaning match on the default name, // and 2 meaning any specified name. MatchType int8 // Match is the string to match against, or null if unused for the given // match type. Match *string }
func NewDescribeClientQuotasRequestComponent ¶
func NewDescribeClientQuotasRequestComponent() DescribeClientQuotasRequestComponent
NewDescribeClientQuotasRequestComponent returns a default DescribeClientQuotasRequestComponent This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeClientQuotasRequestComponent) Default ¶
func (v *DescribeClientQuotasRequestComponent) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClientQuotasRequestComponent.
type DescribeClientQuotasResponse ¶
type DescribeClientQuotasResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // ErrorCode is any error for the request. ErrorCode int16 // ErrorMessage is an error message for the request, or null if the request succeeded. ErrorMessage *string // Entries contains entities that were matched. Entries []DescribeClientQuotasResponseEntry }
DescribeClientQuotasResponse is a response for a DescribeClientQuotasRequest.
func NewDescribeClientQuotasResponse ¶
func NewDescribeClientQuotasResponse() DescribeClientQuotasResponse
NewDescribeClientQuotasResponse returns a default DescribeClientQuotasResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeClientQuotasResponse ¶
func NewPtrDescribeClientQuotasResponse() *DescribeClientQuotasResponse
NewPtrDescribeClientQuotasResponse returns a pointer to a default DescribeClientQuotasResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeClientQuotasResponse) AppendTo ¶
func (v *DescribeClientQuotasResponse) AppendTo(dst []byte) []byte
func (*DescribeClientQuotasResponse) Default ¶
func (v *DescribeClientQuotasResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClientQuotasResponse.
func (*DescribeClientQuotasResponse) GetVersion ¶
func (v *DescribeClientQuotasResponse) GetVersion() int16
func (*DescribeClientQuotasResponse) IsFlexible ¶
func (v *DescribeClientQuotasResponse) IsFlexible() bool
func (*DescribeClientQuotasResponse) Key ¶
func (*DescribeClientQuotasResponse) Key() int16
func (*DescribeClientQuotasResponse) MaxVersion ¶
func (*DescribeClientQuotasResponse) MaxVersion() int16
func (*DescribeClientQuotasResponse) ReadFrom ¶
func (v *DescribeClientQuotasResponse) ReadFrom(src []byte) error
func (*DescribeClientQuotasResponse) RequestKind ¶
func (v *DescribeClientQuotasResponse) RequestKind() Request
func (*DescribeClientQuotasResponse) SetVersion ¶
func (v *DescribeClientQuotasResponse) SetVersion(version int16)
func (*DescribeClientQuotasResponse) Throttle ¶ added in v0.6.2
func (v *DescribeClientQuotasResponse) Throttle() (int32, bool)
type DescribeClientQuotasResponseEntry ¶
type DescribeClientQuotasResponseEntry struct { // Entity contains the quota entity components being described. Entity []DescribeClientQuotasResponseEntryEntity // Values are quota values for the entity. Values []DescribeClientQuotasResponseEntryValue }
func NewDescribeClientQuotasResponseEntry ¶
func NewDescribeClientQuotasResponseEntry() DescribeClientQuotasResponseEntry
NewDescribeClientQuotasResponseEntry returns a default DescribeClientQuotasResponseEntry This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeClientQuotasResponseEntry) Default ¶
func (v *DescribeClientQuotasResponseEntry) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClientQuotasResponseEntry.
type DescribeClientQuotasResponseEntryEntity ¶
type DescribeClientQuotasResponseEntryEntity struct { // Type is the entity type. Type string // Name is the entity name, or null if the default. Name *string }
func NewDescribeClientQuotasResponseEntryEntity ¶
func NewDescribeClientQuotasResponseEntryEntity() DescribeClientQuotasResponseEntryEntity
NewDescribeClientQuotasResponseEntryEntity returns a default DescribeClientQuotasResponseEntryEntity This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeClientQuotasResponseEntryEntity) Default ¶
func (v *DescribeClientQuotasResponseEntryEntity) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClientQuotasResponseEntryEntity.
type DescribeClientQuotasResponseEntryValue ¶
type DescribeClientQuotasResponseEntryValue struct { // Key is the quota configuration key. Key string // Value is the quota configuration value. Value float64 }
func NewDescribeClientQuotasResponseEntryValue ¶
func NewDescribeClientQuotasResponseEntryValue() DescribeClientQuotasResponseEntryValue
NewDescribeClientQuotasResponseEntryValue returns a default DescribeClientQuotasResponseEntryValue This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeClientQuotasResponseEntryValue) Default ¶
func (v *DescribeClientQuotasResponseEntryValue) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClientQuotasResponseEntryValue.
type DescribeClusterRequest ¶ added in v0.6.3
type DescribeClusterRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Whether to include cluster authorized operations. This requires DESCRIBE // on CLUSTER. IncludeClusterAuthorizedOperations bool }
Introduced for KIP-700, DescribeClusterRequest is effectively an "admin" type metadata request for information that producers or consumers do not need to care about.
func NewDescribeClusterRequest ¶ added in v0.6.3
func NewDescribeClusterRequest() DescribeClusterRequest
NewDescribeClusterRequest returns a default DescribeClusterRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeClusterRequest ¶ added in v0.6.3
func NewPtrDescribeClusterRequest() *DescribeClusterRequest
NewPtrDescribeClusterRequest returns a pointer to a default DescribeClusterRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeClusterRequest) AppendTo ¶ added in v0.6.3
func (v *DescribeClusterRequest) AppendTo(dst []byte) []byte
func (*DescribeClusterRequest) Default ¶ added in v0.6.3
func (v *DescribeClusterRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClusterRequest.
func (*DescribeClusterRequest) GetVersion ¶ added in v0.6.3
func (v *DescribeClusterRequest) GetVersion() int16
func (*DescribeClusterRequest) IsFlexible ¶ added in v0.6.3
func (v *DescribeClusterRequest) IsFlexible() bool
func (*DescribeClusterRequest) Key ¶ added in v0.6.3
func (*DescribeClusterRequest) Key() int16
func (*DescribeClusterRequest) MaxVersion ¶ added in v0.6.3
func (*DescribeClusterRequest) MaxVersion() int16
func (*DescribeClusterRequest) ReadFrom ¶ added in v0.6.3
func (v *DescribeClusterRequest) ReadFrom(src []byte) error
func (*DescribeClusterRequest) RequestWith ¶ added in v0.6.3
func (v *DescribeClusterRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeClusterResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeClusterRequest) ResponseKind ¶ added in v0.6.3
func (v *DescribeClusterRequest) ResponseKind() Response
func (*DescribeClusterRequest) SetVersion ¶ added in v0.6.3
func (v *DescribeClusterRequest) SetVersion(version int16)
type DescribeClusterResponse ¶ added in v0.6.3
type DescribeClusterResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // The top level response error code. ErrorCode int16 // The top level error message, if any. ErrorMessage *string // The cluster ID that responding broker belongs to. ClusterID string // The ID of the controller broker. ControllerID int32 // Brokers is a set of alive Kafka brokers (this mirrors MetadataResponse.Brokers). Brokers []DescribeClusterResponseBroker // 32-bit bitfield to represent authorized operations for this cluster. ClusterAuthorizedOperations int32 }
DescribeClusterResponse is a response to a DescribeClusterRequest.
func NewDescribeClusterResponse ¶ added in v0.6.3
func NewDescribeClusterResponse() DescribeClusterResponse
NewDescribeClusterResponse returns a default DescribeClusterResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeClusterResponse ¶ added in v0.6.3
func NewPtrDescribeClusterResponse() *DescribeClusterResponse
NewPtrDescribeClusterResponse returns a pointer to a default DescribeClusterResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeClusterResponse) AppendTo ¶ added in v0.6.3
func (v *DescribeClusterResponse) AppendTo(dst []byte) []byte
func (*DescribeClusterResponse) Default ¶ added in v0.6.3
func (v *DescribeClusterResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClusterResponse.
func (*DescribeClusterResponse) GetVersion ¶ added in v0.6.3
func (v *DescribeClusterResponse) GetVersion() int16
func (*DescribeClusterResponse) IsFlexible ¶ added in v0.6.3
func (v *DescribeClusterResponse) IsFlexible() bool
func (*DescribeClusterResponse) Key ¶ added in v0.6.3
func (*DescribeClusterResponse) Key() int16
func (*DescribeClusterResponse) MaxVersion ¶ added in v0.6.3
func (*DescribeClusterResponse) MaxVersion() int16
func (*DescribeClusterResponse) ReadFrom ¶ added in v0.6.3
func (v *DescribeClusterResponse) ReadFrom(src []byte) error
func (*DescribeClusterResponse) RequestKind ¶ added in v0.6.3
func (v *DescribeClusterResponse) RequestKind() Request
func (*DescribeClusterResponse) SetVersion ¶ added in v0.6.3
func (v *DescribeClusterResponse) SetVersion(version int16)
func (*DescribeClusterResponse) Throttle ¶ added in v0.6.3
func (v *DescribeClusterResponse) Throttle() (int32, bool)
type DescribeClusterResponseBroker ¶ added in v0.6.3
type DescribeClusterResponseBroker struct { // NodeID is the node ID of a Kafka broker. NodeID int32 // Host is the hostname of a Kafka broker. Host string // Port is the port of a Kafka broker. Port int32 // Rack is the rack this Kafka broker is in, if any. Rack *string }
func NewDescribeClusterResponseBroker ¶ added in v0.6.3
func NewDescribeClusterResponseBroker() DescribeClusterResponseBroker
NewDescribeClusterResponseBroker returns a default DescribeClusterResponseBroker This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeClusterResponseBroker) Default ¶ added in v0.6.3
func (v *DescribeClusterResponseBroker) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeClusterResponseBroker.
type DescribeConfigsRequest ¶
type DescribeConfigsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Resources is a list of resources to describe. Resources []DescribeConfigsRequestResource // IncludeSynonyms signifies whether to return config entry synonyms for // all config entries. IncludeSynonyms bool // v1+ // IncludeDocumentation signifies whether to return documentation for // config entries. IncludeDocumentation bool // v3+ }
DescribeConfigsRequest issues a request to describe configs that Kafka currently has. These are the key/value pairs that one uses to configure brokers and topics.
func NewDescribeConfigsRequest ¶
func NewDescribeConfigsRequest() DescribeConfigsRequest
NewDescribeConfigsRequest returns a default DescribeConfigsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeConfigsRequest ¶
func NewPtrDescribeConfigsRequest() *DescribeConfigsRequest
NewPtrDescribeConfigsRequest returns a pointer to a default DescribeConfigsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeConfigsRequest) AppendTo ¶
func (v *DescribeConfigsRequest) AppendTo(dst []byte) []byte
func (*DescribeConfigsRequest) Default ¶
func (v *DescribeConfigsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeConfigsRequest.
func (*DescribeConfigsRequest) GetVersion ¶
func (v *DescribeConfigsRequest) GetVersion() int16
func (*DescribeConfigsRequest) IsFlexible ¶
func (v *DescribeConfigsRequest) IsFlexible() bool
func (*DescribeConfigsRequest) Key ¶
func (*DescribeConfigsRequest) Key() int16
func (*DescribeConfigsRequest) MaxVersion ¶
func (*DescribeConfigsRequest) MaxVersion() int16
func (*DescribeConfigsRequest) ReadFrom ¶
func (v *DescribeConfigsRequest) ReadFrom(src []byte) error
func (*DescribeConfigsRequest) RequestWith ¶
func (v *DescribeConfigsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeConfigsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeConfigsRequest) ResponseKind ¶
func (v *DescribeConfigsRequest) ResponseKind() Response
func (*DescribeConfigsRequest) SetVersion ¶
func (v *DescribeConfigsRequest) SetVersion(version int16)
type DescribeConfigsRequestResource ¶
type DescribeConfigsRequestResource struct { // ResourceType is an enum corresponding to the type of config to describe. ResourceType ConfigResourceType // ResourceName is the name of config to describe. // // If the requested type is a topic, this corresponds to a topic name. // // If the requested type if a broker, this should either be empty or be // the ID of the broker this request is issued to. If it is empty, this // returns all broker configs, but only the dynamic configuration values. // If a specific ID, this returns all broker config values. ResourceName string // ConfigNames is a list of config entries to return. Null requests all. ConfigNames []string }
func NewDescribeConfigsRequestResource ¶
func NewDescribeConfigsRequestResource() DescribeConfigsRequestResource
NewDescribeConfigsRequestResource returns a default DescribeConfigsRequestResource This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeConfigsRequestResource) Default ¶
func (v *DescribeConfigsRequestResource) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeConfigsRequestResource.
type DescribeConfigsResponse ¶
type DescribeConfigsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // Resources are responses for each resource in the describe config request. Resources []DescribeConfigsResponseResource }
DescribeConfigsResponse is returned from a DescribeConfigsRequest.
func NewDescribeConfigsResponse ¶
func NewDescribeConfigsResponse() DescribeConfigsResponse
NewDescribeConfigsResponse returns a default DescribeConfigsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeConfigsResponse ¶
func NewPtrDescribeConfigsResponse() *DescribeConfigsResponse
NewPtrDescribeConfigsResponse returns a pointer to a default DescribeConfigsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeConfigsResponse) AppendTo ¶
func (v *DescribeConfigsResponse) AppendTo(dst []byte) []byte
func (*DescribeConfigsResponse) Default ¶
func (v *DescribeConfigsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeConfigsResponse.
func (*DescribeConfigsResponse) GetVersion ¶
func (v *DescribeConfigsResponse) GetVersion() int16
func (*DescribeConfigsResponse) IsFlexible ¶
func (v *DescribeConfigsResponse) IsFlexible() bool
func (*DescribeConfigsResponse) Key ¶
func (*DescribeConfigsResponse) Key() int16
func (*DescribeConfigsResponse) MaxVersion ¶
func (*DescribeConfigsResponse) MaxVersion() int16
func (*DescribeConfigsResponse) ReadFrom ¶
func (v *DescribeConfigsResponse) ReadFrom(src []byte) error
func (*DescribeConfigsResponse) RequestKind ¶
func (v *DescribeConfigsResponse) RequestKind() Request
func (*DescribeConfigsResponse) SetVersion ¶
func (v *DescribeConfigsResponse) SetVersion(version int16)
func (*DescribeConfigsResponse) Throttle ¶ added in v0.6.2
func (v *DescribeConfigsResponse) Throttle() (int32, bool)
type DescribeConfigsResponseResource ¶
type DescribeConfigsResponseResource struct { // ErrorCode is the error code returned for describing configs. // // INVALID_REQUEST is returned if asking to descibe an invalid resource // type. // // CLUSTER_AUTHORIZATION_FAILED is returned if asking to describe broker // configs but the client is not authorized to do so. // // TOPIC_AUTHORIZATION_FAILED is returned if asking to describe topic // configs but the client is not authorized to do so. // // INVALID_TOPIC_EXCEPTION is returned if the requested topic was invalid. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of // the requested topic. ErrorCode int16 // ErrorMessage is an informative message if the describe config failed. ErrorMessage *string // ResourceType is the enum corresponding to the type of described config. ResourceType ConfigResourceType // ResourceName is the name corresponding to the describe config request. ResourceName string // Configs contains information about key/value config pairs for // the requested resource. Configs []DescribeConfigsResponseResourceConfig }
func NewDescribeConfigsResponseResource ¶
func NewDescribeConfigsResponseResource() DescribeConfigsResponseResource
NewDescribeConfigsResponseResource returns a default DescribeConfigsResponseResource This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeConfigsResponseResource) Default ¶
func (v *DescribeConfigsResponseResource) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeConfigsResponseResource.
type DescribeConfigsResponseResourceConfig ¶
type DescribeConfigsResponseResourceConfig struct { // Name is a key this entry corresponds to (e.g. segment.bytes). Name string // Value is the value for this config key. If the key is sensitive, // the value will be null. Value *string // ReadOnly signifies whether this is not a dynamic config option. ReadOnly bool // IsDefault is whether this is a default config option. This has been // replaced in favor of Source. IsDefault bool // Source is where this config entry is from. Source ConfigSource // v1+ // IsSensitive signifies whether this is a sensitive config key, which // is either a password or an unknown type. IsSensitive bool // ConfigSynonyms contains fallback key/value pairs for this config // entry, in order of preference. That is, if a config entry is both // dynamically configured and has a default, the top level return will be // the dynamic configuration, while its "synonym" will be the default. ConfigSynonyms []DescribeConfigsResponseResourceConfigConfigSynonym // v1+ // ConfigType specifies the configuration data type. ConfigType ConfigType // v3+ // Documentation is optional documentation for the config entry. Documentation *string // v3+ }
func NewDescribeConfigsResponseResourceConfig ¶
func NewDescribeConfigsResponseResourceConfig() DescribeConfigsResponseResourceConfig
NewDescribeConfigsResponseResourceConfig returns a default DescribeConfigsResponseResourceConfig This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeConfigsResponseResourceConfig) Default ¶
func (v *DescribeConfigsResponseResourceConfig) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeConfigsResponseResourceConfig.
type DescribeConfigsResponseResourceConfigConfigSynonym ¶
type DescribeConfigsResponseResourceConfigConfigSynonym struct { Name string Value *string Source ConfigSource }
func NewDescribeConfigsResponseResourceConfigConfigSynonym ¶
func NewDescribeConfigsResponseResourceConfigConfigSynonym() DescribeConfigsResponseResourceConfigConfigSynonym
NewDescribeConfigsResponseResourceConfigConfigSynonym returns a default DescribeConfigsResponseResourceConfigConfigSynonym This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeConfigsResponseResourceConfigConfigSynonym) Default ¶
func (v *DescribeConfigsResponseResourceConfigConfigSynonym) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeConfigsResponseResourceConfigConfigSynonym.
type DescribeDelegationTokenRequest ¶
type DescribeDelegationTokenRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Owners contains owners to describe delegation tokens for, or null for all. // If non-null, only tokens created from a matching principal type, name // combination are printed. Owners []DescribeDelegationTokenRequestOwner }
DescribeDelegationTokenRequest is a request to describe delegation tokens.
func NewDescribeDelegationTokenRequest ¶
func NewDescribeDelegationTokenRequest() DescribeDelegationTokenRequest
NewDescribeDelegationTokenRequest returns a default DescribeDelegationTokenRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeDelegationTokenRequest ¶
func NewPtrDescribeDelegationTokenRequest() *DescribeDelegationTokenRequest
NewPtrDescribeDelegationTokenRequest returns a pointer to a default DescribeDelegationTokenRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeDelegationTokenRequest) AppendTo ¶
func (v *DescribeDelegationTokenRequest) AppendTo(dst []byte) []byte
func (*DescribeDelegationTokenRequest) Default ¶
func (v *DescribeDelegationTokenRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeDelegationTokenRequest.
func (*DescribeDelegationTokenRequest) GetVersion ¶
func (v *DescribeDelegationTokenRequest) GetVersion() int16
func (*DescribeDelegationTokenRequest) IsFlexible ¶
func (v *DescribeDelegationTokenRequest) IsFlexible() bool
func (*DescribeDelegationTokenRequest) Key ¶
func (*DescribeDelegationTokenRequest) Key() int16
func (*DescribeDelegationTokenRequest) MaxVersion ¶
func (*DescribeDelegationTokenRequest) MaxVersion() int16
func (*DescribeDelegationTokenRequest) ReadFrom ¶
func (v *DescribeDelegationTokenRequest) ReadFrom(src []byte) error
func (*DescribeDelegationTokenRequest) RequestWith ¶
func (v *DescribeDelegationTokenRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeDelegationTokenResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeDelegationTokenRequest) ResponseKind ¶
func (v *DescribeDelegationTokenRequest) ResponseKind() Response
func (*DescribeDelegationTokenRequest) SetVersion ¶
func (v *DescribeDelegationTokenRequest) SetVersion(version int16)
type DescribeDelegationTokenRequestOwner ¶
type DescribeDelegationTokenRequestOwner struct { // PrincipalType is a type to match to describe delegation tokens created // with this principal. This would be "User" with the simple authorizer. PrincipalType string // PrincipalName is the name to match to describe delegation tokens created // with this principal. PrincipalName string }
func NewDescribeDelegationTokenRequestOwner ¶
func NewDescribeDelegationTokenRequestOwner() DescribeDelegationTokenRequestOwner
NewDescribeDelegationTokenRequestOwner returns a default DescribeDelegationTokenRequestOwner This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeDelegationTokenRequestOwner) Default ¶
func (v *DescribeDelegationTokenRequestOwner) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeDelegationTokenRequestOwner.
type DescribeDelegationTokenResponse ¶
type DescribeDelegationTokenResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ErrorCode is any error that caused the request to fail. ErrorCode int16 // TokenDetails shows information about each token created from any principal // in the request. TokenDetails []DescribeDelegationTokenResponseTokenDetail // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 }
DescribeDelegationTokenResponsee is a response to a DescribeDelegationTokenRequest.
func NewDescribeDelegationTokenResponse ¶
func NewDescribeDelegationTokenResponse() DescribeDelegationTokenResponse
NewDescribeDelegationTokenResponse returns a default DescribeDelegationTokenResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeDelegationTokenResponse ¶
func NewPtrDescribeDelegationTokenResponse() *DescribeDelegationTokenResponse
NewPtrDescribeDelegationTokenResponse returns a pointer to a default DescribeDelegationTokenResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeDelegationTokenResponse) AppendTo ¶
func (v *DescribeDelegationTokenResponse) AppendTo(dst []byte) []byte
func (*DescribeDelegationTokenResponse) Default ¶
func (v *DescribeDelegationTokenResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeDelegationTokenResponse.
func (*DescribeDelegationTokenResponse) GetVersion ¶
func (v *DescribeDelegationTokenResponse) GetVersion() int16
func (*DescribeDelegationTokenResponse) IsFlexible ¶
func (v *DescribeDelegationTokenResponse) IsFlexible() bool
func (*DescribeDelegationTokenResponse) Key ¶
func (*DescribeDelegationTokenResponse) Key() int16
func (*DescribeDelegationTokenResponse) MaxVersion ¶
func (*DescribeDelegationTokenResponse) MaxVersion() int16
func (*DescribeDelegationTokenResponse) ReadFrom ¶
func (v *DescribeDelegationTokenResponse) ReadFrom(src []byte) error
func (*DescribeDelegationTokenResponse) RequestKind ¶
func (v *DescribeDelegationTokenResponse) RequestKind() Request
func (*DescribeDelegationTokenResponse) SetVersion ¶
func (v *DescribeDelegationTokenResponse) SetVersion(version int16)
func (*DescribeDelegationTokenResponse) Throttle ¶ added in v0.6.2
func (v *DescribeDelegationTokenResponse) Throttle() (int32, bool)
type DescribeDelegationTokenResponseTokenDetail ¶
type DescribeDelegationTokenResponseTokenDetail struct { // PrincipalType is the principal type of who created this token. PrincipalType string // PrincipalName is the principal name of who created this token. PrincipalName string // IssueTimestamp is the millisecond timestamp of when this token was issued. IssueTimestamp int64 // ExpiryTimestamp is the millisecond timestamp of when this token will expire. ExpiryTimestamp int64 // MaxTimestamp is the millisecond timestamp past which whis token cannot // be renewed. MaxTimestamp int64 // TokenID is the ID (scram username) of this token. TokenID string // HMAC is the password of this token. HMAC []byte // Renewers is a list of users that can renew this token. Renewers []DescribeDelegationTokenResponseTokenDetailRenewer }
func NewDescribeDelegationTokenResponseTokenDetail ¶
func NewDescribeDelegationTokenResponseTokenDetail() DescribeDelegationTokenResponseTokenDetail
NewDescribeDelegationTokenResponseTokenDetail returns a default DescribeDelegationTokenResponseTokenDetail This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeDelegationTokenResponseTokenDetail) Default ¶
func (v *DescribeDelegationTokenResponseTokenDetail) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeDelegationTokenResponseTokenDetail.
type DescribeDelegationTokenResponseTokenDetailRenewer ¶
type DescribeDelegationTokenResponseTokenDetailRenewer struct { PrincipalType string PrincipalName string }
func NewDescribeDelegationTokenResponseTokenDetailRenewer ¶
func NewDescribeDelegationTokenResponseTokenDetailRenewer() DescribeDelegationTokenResponseTokenDetailRenewer
NewDescribeDelegationTokenResponseTokenDetailRenewer returns a default DescribeDelegationTokenResponseTokenDetailRenewer This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeDelegationTokenResponseTokenDetailRenewer) Default ¶
func (v *DescribeDelegationTokenResponseTokenDetailRenewer) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeDelegationTokenResponseTokenDetailRenewer.
type DescribeGroupsRequest ¶
type DescribeGroupsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Groups is an array of group IDs to request metadata for. Groups []string // IncludeAuthorizedOperations, introduced in Kafka 2.3.0, specifies // whether to include a bitfield of AclOperations this client can perform // on the groups. See KIP-430 for more details. IncludeAuthorizedOperations bool }
DescribeGroupsRequest requests metadata for group IDs.
func NewDescribeGroupsRequest ¶
func NewDescribeGroupsRequest() DescribeGroupsRequest
NewDescribeGroupsRequest returns a default DescribeGroupsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeGroupsRequest ¶
func NewPtrDescribeGroupsRequest() *DescribeGroupsRequest
NewPtrDescribeGroupsRequest returns a pointer to a default DescribeGroupsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeGroupsRequest) AppendTo ¶
func (v *DescribeGroupsRequest) AppendTo(dst []byte) []byte
func (*DescribeGroupsRequest) Default ¶
func (v *DescribeGroupsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeGroupsRequest.
func (*DescribeGroupsRequest) GetVersion ¶
func (v *DescribeGroupsRequest) GetVersion() int16
func (*DescribeGroupsRequest) IsFlexible ¶
func (v *DescribeGroupsRequest) IsFlexible() bool
func (*DescribeGroupsRequest) IsGroupCoordinatorRequest ¶
func (v *DescribeGroupsRequest) IsGroupCoordinatorRequest()
func (*DescribeGroupsRequest) Key ¶
func (*DescribeGroupsRequest) Key() int16
func (*DescribeGroupsRequest) MaxVersion ¶
func (*DescribeGroupsRequest) MaxVersion() int16
func (*DescribeGroupsRequest) ReadFrom ¶
func (v *DescribeGroupsRequest) ReadFrom(src []byte) error
func (*DescribeGroupsRequest) RequestWith ¶
func (v *DescribeGroupsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeGroupsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeGroupsRequest) ResponseKind ¶
func (v *DescribeGroupsRequest) ResponseKind() Response
func (*DescribeGroupsRequest) SetVersion ¶
func (v *DescribeGroupsRequest) SetVersion(version int16)
type DescribeGroupsResponse ¶
type DescribeGroupsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // Groups is an array of group metadata. Groups []DescribeGroupsResponseGroup }
DescribeGroupsResponse is returned from a DescribeGroupsRequest.
func NewDescribeGroupsResponse ¶
func NewDescribeGroupsResponse() DescribeGroupsResponse
NewDescribeGroupsResponse returns a default DescribeGroupsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeGroupsResponse ¶
func NewPtrDescribeGroupsResponse() *DescribeGroupsResponse
NewPtrDescribeGroupsResponse returns a pointer to a default DescribeGroupsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeGroupsResponse) AppendTo ¶
func (v *DescribeGroupsResponse) AppendTo(dst []byte) []byte
func (*DescribeGroupsResponse) Default ¶
func (v *DescribeGroupsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeGroupsResponse.
func (*DescribeGroupsResponse) GetVersion ¶
func (v *DescribeGroupsResponse) GetVersion() int16
func (*DescribeGroupsResponse) IsFlexible ¶
func (v *DescribeGroupsResponse) IsFlexible() bool
func (*DescribeGroupsResponse) Key ¶
func (*DescribeGroupsResponse) Key() int16
func (*DescribeGroupsResponse) MaxVersion ¶
func (*DescribeGroupsResponse) MaxVersion() int16
func (*DescribeGroupsResponse) ReadFrom ¶
func (v *DescribeGroupsResponse) ReadFrom(src []byte) error
func (*DescribeGroupsResponse) RequestKind ¶
func (v *DescribeGroupsResponse) RequestKind() Request
func (*DescribeGroupsResponse) SetVersion ¶
func (v *DescribeGroupsResponse) SetVersion(version int16)
func (*DescribeGroupsResponse) Throttle ¶ added in v0.6.2
func (v *DescribeGroupsResponse) Throttle() (int32, bool)
type DescribeGroupsResponseGroup ¶
type DescribeGroupsResponseGroup struct { // ErrorCode is the error code for an individual group in a request. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to describe a group. // // INVALID_GROUP_ID is returned if the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator for this // group is not yet active. // // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is loading. // // NOT_COORDINATOR is returned if the requested broker is not the // coordinator for this group. ErrorCode int16 // Group is the id of this group. Group string // State is the state this group is in. State string // ProtocolType is the "type" of protocol being used for this group. ProtocolType string // Protocol is the agreed upon protocol for all members in this group. Protocol string // Members contains members in this group. Members []DescribeGroupsResponseGroupMember // AuthorizedOperations is a bitfield containing which operations the // the client is allowed to perform on this group. // This is only returned if requested. AuthorizedOperations int32 // v3+ }
func NewDescribeGroupsResponseGroup ¶
func NewDescribeGroupsResponseGroup() DescribeGroupsResponseGroup
NewDescribeGroupsResponseGroup returns a default DescribeGroupsResponseGroup This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeGroupsResponseGroup) Default ¶
func (v *DescribeGroupsResponseGroup) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeGroupsResponseGroup.
type DescribeGroupsResponseGroupMember ¶
type DescribeGroupsResponseGroupMember struct { // MemberID is the member ID of a member in this group. MemberID string // InstanceID is the instance ID of this member in the group (KIP-345). InstanceID *string // v4+ // ClientID is the client ID used by this member. ClientID string // ClientHost is the host this client is running on. ClientHost string // ProtocolMetadata is the metadata this member included when joining // the group. If using normal (Java-like) consumers, this will be of // type GroupMemberMetadata. ProtocolMetadata []byte // MemberAssignment is the assignment for this member in the group. // If using normal (Java-like) consumers, this will be of type // GroupMemberAssignment. MemberAssignment []byte }
func NewDescribeGroupsResponseGroupMember ¶
func NewDescribeGroupsResponseGroupMember() DescribeGroupsResponseGroupMember
NewDescribeGroupsResponseGroupMember returns a default DescribeGroupsResponseGroupMember This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeGroupsResponseGroupMember) Default ¶
func (v *DescribeGroupsResponseGroupMember) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeGroupsResponseGroupMember.
type DescribeLogDirsRequest ¶
type DescribeLogDirsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Topics is an array of topics to describe the log dirs of. If this is // null, the response includes all topics and all of their partitions. Topics []DescribeLogDirsRequestTopic }
DescribeLogDirsRequest requests directory information for topic partitions. This request was added in support of KIP-113.
func NewDescribeLogDirsRequest ¶
func NewDescribeLogDirsRequest() DescribeLogDirsRequest
NewDescribeLogDirsRequest returns a default DescribeLogDirsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeLogDirsRequest ¶
func NewPtrDescribeLogDirsRequest() *DescribeLogDirsRequest
NewPtrDescribeLogDirsRequest returns a pointer to a default DescribeLogDirsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeLogDirsRequest) AppendTo ¶
func (v *DescribeLogDirsRequest) AppendTo(dst []byte) []byte
func (*DescribeLogDirsRequest) Default ¶
func (v *DescribeLogDirsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeLogDirsRequest.
func (*DescribeLogDirsRequest) GetVersion ¶
func (v *DescribeLogDirsRequest) GetVersion() int16
func (*DescribeLogDirsRequest) IsFlexible ¶
func (v *DescribeLogDirsRequest) IsFlexible() bool
func (*DescribeLogDirsRequest) Key ¶
func (*DescribeLogDirsRequest) Key() int16
func (*DescribeLogDirsRequest) MaxVersion ¶
func (*DescribeLogDirsRequest) MaxVersion() int16
func (*DescribeLogDirsRequest) ReadFrom ¶
func (v *DescribeLogDirsRequest) ReadFrom(src []byte) error
func (*DescribeLogDirsRequest) RequestWith ¶
func (v *DescribeLogDirsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeLogDirsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeLogDirsRequest) ResponseKind ¶
func (v *DescribeLogDirsRequest) ResponseKind() Response
func (*DescribeLogDirsRequest) SetVersion ¶
func (v *DescribeLogDirsRequest) SetVersion(version int16)
type DescribeLogDirsRequestTopic ¶
type DescribeLogDirsRequestTopic struct { // Topic is a topic to describe the log dir of. Topic string // Partitions contains topic partitions to describe the log dirs of. Partitions []int32 }
func NewDescribeLogDirsRequestTopic ¶
func NewDescribeLogDirsRequestTopic() DescribeLogDirsRequestTopic
NewDescribeLogDirsRequestTopic returns a default DescribeLogDirsRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeLogDirsRequestTopic) Default ¶
func (v *DescribeLogDirsRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeLogDirsRequestTopic.
type DescribeLogDirsResponse ¶
type DescribeLogDirsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Dirs pairs log directories with the topics and partitions that are // stored in those directores. Dirs []DescribeLogDirsResponseDir }
DescribeLogDirsResponse is returned from a DescribeLogDirsRequest.
func NewDescribeLogDirsResponse ¶
func NewDescribeLogDirsResponse() DescribeLogDirsResponse
NewDescribeLogDirsResponse returns a default DescribeLogDirsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeLogDirsResponse ¶
func NewPtrDescribeLogDirsResponse() *DescribeLogDirsResponse
NewPtrDescribeLogDirsResponse returns a pointer to a default DescribeLogDirsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeLogDirsResponse) AppendTo ¶
func (v *DescribeLogDirsResponse) AppendTo(dst []byte) []byte
func (*DescribeLogDirsResponse) Default ¶
func (v *DescribeLogDirsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeLogDirsResponse.
func (*DescribeLogDirsResponse) GetVersion ¶
func (v *DescribeLogDirsResponse) GetVersion() int16
func (*DescribeLogDirsResponse) IsFlexible ¶
func (v *DescribeLogDirsResponse) IsFlexible() bool
func (*DescribeLogDirsResponse) Key ¶
func (*DescribeLogDirsResponse) Key() int16
func (*DescribeLogDirsResponse) MaxVersion ¶
func (*DescribeLogDirsResponse) MaxVersion() int16
func (*DescribeLogDirsResponse) ReadFrom ¶
func (v *DescribeLogDirsResponse) ReadFrom(src []byte) error
func (*DescribeLogDirsResponse) RequestKind ¶
func (v *DescribeLogDirsResponse) RequestKind() Request
func (*DescribeLogDirsResponse) SetVersion ¶
func (v *DescribeLogDirsResponse) SetVersion(version int16)
func (*DescribeLogDirsResponse) Throttle ¶ added in v0.6.2
func (v *DescribeLogDirsResponse) Throttle() (int32, bool)
type DescribeLogDirsResponseDir ¶
type DescribeLogDirsResponseDir struct { // ErrorCode is the error code returned for descrbing log dirs. // // KAFKA_STORAGE_ERROR is returned if the log directoy is offline. ErrorCode int16 // Dir is the absolute path of a log directory. Dir string // Topics is an array of topics within a log directory. Topics []DescribeLogDirsResponseDirTopic }
func NewDescribeLogDirsResponseDir ¶
func NewDescribeLogDirsResponseDir() DescribeLogDirsResponseDir
NewDescribeLogDirsResponseDir returns a default DescribeLogDirsResponseDir This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeLogDirsResponseDir) Default ¶
func (v *DescribeLogDirsResponseDir) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeLogDirsResponseDir.
type DescribeLogDirsResponseDirTopic ¶
type DescribeLogDirsResponseDirTopic struct { // Topic is the name of a Kafka topic. Topic string // Partitions is the set of queried partitions for a topic that are // within a log directory. Partitions []DescribeLogDirsResponseDirTopicPartition }
func NewDescribeLogDirsResponseDirTopic ¶
func NewDescribeLogDirsResponseDirTopic() DescribeLogDirsResponseDirTopic
NewDescribeLogDirsResponseDirTopic returns a default DescribeLogDirsResponseDirTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeLogDirsResponseDirTopic) Default ¶
func (v *DescribeLogDirsResponseDirTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeLogDirsResponseDirTopic.
type DescribeLogDirsResponseDirTopicPartition ¶
type DescribeLogDirsResponseDirTopicPartition struct { // Partition is a partition ID. Partition int32 // Size is the total size of the log sements of this partition, in bytes. Size int64 // OffsetLag is how far behind the log end offset is compared to // the partition's high watermark (if this is the current log for // the partition) or compared to the current replica's log end // offset (if this is the future log for the patition). // // The math is, // // if IsFuture, localLogEndOffset - futurelogEndOffset. // // otherwise, max(localHighWatermark - logEndOffset, 0). OffsetLag int64 // IsFuture is true if this replica was created by an // AlterReplicaLogDirsRequest and will replace the current log of the // replica in the future. IsFuture bool }
func NewDescribeLogDirsResponseDirTopicPartition ¶
func NewDescribeLogDirsResponseDirTopicPartition() DescribeLogDirsResponseDirTopicPartition
NewDescribeLogDirsResponseDirTopicPartition returns a default DescribeLogDirsResponseDirTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeLogDirsResponseDirTopicPartition) Default ¶
func (v *DescribeLogDirsResponseDirTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeLogDirsResponseDirTopicPartition.
type DescribeProducersRequest ¶ added in v0.6.4
type DescribeProducersRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The topics to describe producers for. Topics []DescribeProducersRequestTopic }
Introduced for KIP-664, DescribeProducersRequest allows for introspecting the state of the transaction coordinator. This request can be used to detect hanging transactions or other EOS-related problems.
This request allows for describing the state of the active idempotent/transactional producers.
func NewDescribeProducersRequest ¶ added in v0.6.4
func NewDescribeProducersRequest() DescribeProducersRequest
NewDescribeProducersRequest returns a default DescribeProducersRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeProducersRequest ¶ added in v0.6.4
func NewPtrDescribeProducersRequest() *DescribeProducersRequest
NewPtrDescribeProducersRequest returns a pointer to a default DescribeProducersRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeProducersRequest) AppendTo ¶ added in v0.6.4
func (v *DescribeProducersRequest) AppendTo(dst []byte) []byte
func (*DescribeProducersRequest) Default ¶ added in v0.6.4
func (v *DescribeProducersRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeProducersRequest.
func (*DescribeProducersRequest) GetVersion ¶ added in v0.6.4
func (v *DescribeProducersRequest) GetVersion() int16
func (*DescribeProducersRequest) IsFlexible ¶ added in v0.6.4
func (v *DescribeProducersRequest) IsFlexible() bool
func (*DescribeProducersRequest) Key ¶ added in v0.6.4
func (*DescribeProducersRequest) Key() int16
func (*DescribeProducersRequest) MaxVersion ¶ added in v0.6.4
func (*DescribeProducersRequest) MaxVersion() int16
func (*DescribeProducersRequest) ReadFrom ¶ added in v0.6.4
func (v *DescribeProducersRequest) ReadFrom(src []byte) error
func (*DescribeProducersRequest) RequestWith ¶ added in v0.6.4
func (v *DescribeProducersRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeProducersResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeProducersRequest) ResponseKind ¶ added in v0.6.4
func (v *DescribeProducersRequest) ResponseKind() Response
func (*DescribeProducersRequest) SetVersion ¶ added in v0.6.4
func (v *DescribeProducersRequest) SetVersion(version int16)
type DescribeProducersRequestTopic ¶ added in v0.6.4
type DescribeProducersRequestTopic struct { Topic string // The partitions to list producers for for the given topic. Partitions []int32 }
func NewDescribeProducersRequestTopic ¶ added in v0.6.4
func NewDescribeProducersRequestTopic() DescribeProducersRequestTopic
NewDescribeProducersRequestTopic returns a default DescribeProducersRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeProducersRequestTopic) Default ¶ added in v0.6.4
func (v *DescribeProducersRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeProducersRequestTopic.
type DescribeProducersResponse ¶ added in v0.6.4
type DescribeProducersResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 Topics []DescribeProducersResponseTopic }
DescribeProducersResponse is a response to a DescribeProducersRequest.
func NewDescribeProducersResponse ¶ added in v0.6.4
func NewDescribeProducersResponse() DescribeProducersResponse
NewDescribeProducersResponse returns a default DescribeProducersResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeProducersResponse ¶ added in v0.6.4
func NewPtrDescribeProducersResponse() *DescribeProducersResponse
NewPtrDescribeProducersResponse returns a pointer to a default DescribeProducersResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeProducersResponse) AppendTo ¶ added in v0.6.4
func (v *DescribeProducersResponse) AppendTo(dst []byte) []byte
func (*DescribeProducersResponse) Default ¶ added in v0.6.4
func (v *DescribeProducersResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeProducersResponse.
func (*DescribeProducersResponse) GetVersion ¶ added in v0.6.4
func (v *DescribeProducersResponse) GetVersion() int16
func (*DescribeProducersResponse) IsFlexible ¶ added in v0.6.4
func (v *DescribeProducersResponse) IsFlexible() bool
func (*DescribeProducersResponse) Key ¶ added in v0.6.4
func (*DescribeProducersResponse) Key() int16
func (*DescribeProducersResponse) MaxVersion ¶ added in v0.6.4
func (*DescribeProducersResponse) MaxVersion() int16
func (*DescribeProducersResponse) ReadFrom ¶ added in v0.6.4
func (v *DescribeProducersResponse) ReadFrom(src []byte) error
func (*DescribeProducersResponse) RequestKind ¶ added in v0.6.4
func (v *DescribeProducersResponse) RequestKind() Request
func (*DescribeProducersResponse) SetVersion ¶ added in v0.6.4
func (v *DescribeProducersResponse) SetVersion(version int16)
func (*DescribeProducersResponse) Throttle ¶ added in v0.6.4
func (v *DescribeProducersResponse) Throttle() (int32, bool)
type DescribeProducersResponseTopic ¶ added in v0.6.4
type DescribeProducersResponseTopic struct { Topic string Partitions []DescribeProducersResponseTopicPartition }
func NewDescribeProducersResponseTopic ¶ added in v0.6.4
func NewDescribeProducersResponseTopic() DescribeProducersResponseTopic
NewDescribeProducersResponseTopic returns a default DescribeProducersResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeProducersResponseTopic) Default ¶ added in v0.6.4
func (v *DescribeProducersResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeProducersResponseTopic.
type DescribeProducersResponseTopicPartition ¶ added in v0.6.4
type DescribeProducersResponseTopicPartition struct { Partition int32 // The partition error code, or 0 if there was no error. // // NOT_LEADER_OR_FOLLOWER is returned if the broker receiving this request // is not the leader of the partition. // // TOPIC_AUTHORIZATION_FAILED is returned if the user does not have Describe // permissions on the topic. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the partition is not known to exist. // // Other errors may be returned corresponding to the partition being offline, etc. ErrorCode int16 // The partition error message, which may be null if no additional details are available. ErrorMessage *string // The current idempotent or transactional producers producing to this partition, // and the metadata related to their produce requests. ActiveProducers []DescribeProducersResponseTopicPartitionActiveProducer }
func NewDescribeProducersResponseTopicPartition ¶ added in v0.6.4
func NewDescribeProducersResponseTopicPartition() DescribeProducersResponseTopicPartition
NewDescribeProducersResponseTopicPartition returns a default DescribeProducersResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeProducersResponseTopicPartition) Default ¶ added in v0.6.4
func (v *DescribeProducersResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeProducersResponseTopicPartition.
type DescribeProducersResponseTopicPartitionActiveProducer ¶ added in v0.6.4
type DescribeProducersResponseTopicPartitionActiveProducer struct { ProducerID int64 ProducerEpoch int32 // The last sequence produced. LastSequence int32 // The last timestamp produced. LastTimestamp int64 // The epoch of the transactional coordinator for this last produce. CoordinatorEpoch int32 // The first offset of the transaction. CurrentTxnStartOffset int64 }
func NewDescribeProducersResponseTopicPartitionActiveProducer ¶ added in v0.6.4
func NewDescribeProducersResponseTopicPartitionActiveProducer() DescribeProducersResponseTopicPartitionActiveProducer
NewDescribeProducersResponseTopicPartitionActiveProducer returns a default DescribeProducersResponseTopicPartitionActiveProducer This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeProducersResponseTopicPartitionActiveProducer) Default ¶ added in v0.6.4
func (v *DescribeProducersResponseTopicPartitionActiveProducer) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeProducersResponseTopicPartitionActiveProducer.
type DescribeQuorumRequest ¶
type DescribeQuorumRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 Topics []DescribeQuorumRequestTopic }
Part of KIP-642 (and KIP-595) to replace Kafka's dependence on Zookeeper with a Kafka-only raft protocol, DescribeQuorumRequest is sent by a leader to describe the quorum.
func NewDescribeQuorumRequest ¶
func NewDescribeQuorumRequest() DescribeQuorumRequest
NewDescribeQuorumRequest returns a default DescribeQuorumRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeQuorumRequest ¶
func NewPtrDescribeQuorumRequest() *DescribeQuorumRequest
NewPtrDescribeQuorumRequest returns a pointer to a default DescribeQuorumRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeQuorumRequest) AppendTo ¶
func (v *DescribeQuorumRequest) AppendTo(dst []byte) []byte
func (*DescribeQuorumRequest) Default ¶
func (v *DescribeQuorumRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeQuorumRequest.
func (*DescribeQuorumRequest) GetVersion ¶
func (v *DescribeQuorumRequest) GetVersion() int16
func (*DescribeQuorumRequest) IsAdminRequest ¶
func (v *DescribeQuorumRequest) IsAdminRequest()
func (*DescribeQuorumRequest) IsFlexible ¶
func (v *DescribeQuorumRequest) IsFlexible() bool
func (*DescribeQuorumRequest) Key ¶
func (*DescribeQuorumRequest) Key() int16
func (*DescribeQuorumRequest) MaxVersion ¶
func (*DescribeQuorumRequest) MaxVersion() int16
func (*DescribeQuorumRequest) ReadFrom ¶
func (v *DescribeQuorumRequest) ReadFrom(src []byte) error
func (*DescribeQuorumRequest) RequestWith ¶
func (v *DescribeQuorumRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeQuorumResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeQuorumRequest) ResponseKind ¶
func (v *DescribeQuorumRequest) ResponseKind() Response
func (*DescribeQuorumRequest) SetVersion ¶
func (v *DescribeQuorumRequest) SetVersion(version int16)
type DescribeQuorumRequestTopic ¶
type DescribeQuorumRequestTopic struct { Topic string Partitions []DescribeQuorumRequestTopicPartition }
func NewDescribeQuorumRequestTopic ¶
func NewDescribeQuorumRequestTopic() DescribeQuorumRequestTopic
NewDescribeQuorumRequestTopic returns a default DescribeQuorumRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeQuorumRequestTopic) Default ¶
func (v *DescribeQuorumRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeQuorumRequestTopic.
type DescribeQuorumRequestTopicPartition ¶
type DescribeQuorumRequestTopicPartition struct {
Partition int32
}
func NewDescribeQuorumRequestTopicPartition ¶
func NewDescribeQuorumRequestTopicPartition() DescribeQuorumRequestTopicPartition
NewDescribeQuorumRequestTopicPartition returns a default DescribeQuorumRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeQuorumRequestTopicPartition) Default ¶
func (v *DescribeQuorumRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeQuorumRequestTopicPartition.
type DescribeQuorumResponse ¶
type DescribeQuorumResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 ErrorCode int16 Topics []DescribeQuorumResponseTopic }
func NewDescribeQuorumResponse ¶
func NewDescribeQuorumResponse() DescribeQuorumResponse
NewDescribeQuorumResponse returns a default DescribeQuorumResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeQuorumResponse ¶
func NewPtrDescribeQuorumResponse() *DescribeQuorumResponse
NewPtrDescribeQuorumResponse returns a pointer to a default DescribeQuorumResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeQuorumResponse) AppendTo ¶
func (v *DescribeQuorumResponse) AppendTo(dst []byte) []byte
func (*DescribeQuorumResponse) Default ¶
func (v *DescribeQuorumResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeQuorumResponse.
func (*DescribeQuorumResponse) GetVersion ¶
func (v *DescribeQuorumResponse) GetVersion() int16
func (*DescribeQuorumResponse) IsFlexible ¶
func (v *DescribeQuorumResponse) IsFlexible() bool
func (*DescribeQuorumResponse) Key ¶
func (*DescribeQuorumResponse) Key() int16
func (*DescribeQuorumResponse) MaxVersion ¶
func (*DescribeQuorumResponse) MaxVersion() int16
func (*DescribeQuorumResponse) ReadFrom ¶
func (v *DescribeQuorumResponse) ReadFrom(src []byte) error
func (*DescribeQuorumResponse) RequestKind ¶
func (v *DescribeQuorumResponse) RequestKind() Request
func (*DescribeQuorumResponse) SetVersion ¶
func (v *DescribeQuorumResponse) SetVersion(version int16)
type DescribeQuorumResponseTopic ¶
type DescribeQuorumResponseTopic struct { Topic string Partitions []DescribeQuorumResponseTopicPartition }
func NewDescribeQuorumResponseTopic ¶
func NewDescribeQuorumResponseTopic() DescribeQuorumResponseTopic
NewDescribeQuorumResponseTopic returns a default DescribeQuorumResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeQuorumResponseTopic) Default ¶
func (v *DescribeQuorumResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeQuorumResponseTopic.
type DescribeQuorumResponseTopicPartition ¶
type DescribeQuorumResponseTopicPartition struct { Partition int32 ErrorCode int16 // The ID of the current leader, or -1 if the leader is unknown. LeaderID int32 // The latest known leader epoch. LeaderEpoch int32 HighWatermark int64 CurrentVoters []DescribeQuorumResponseTopicPartitionReplicaState Observers []DescribeQuorumResponseTopicPartitionReplicaState }
func NewDescribeQuorumResponseTopicPartition ¶
func NewDescribeQuorumResponseTopicPartition() DescribeQuorumResponseTopicPartition
NewDescribeQuorumResponseTopicPartition returns a default DescribeQuorumResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeQuorumResponseTopicPartition) Default ¶
func (v *DescribeQuorumResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeQuorumResponseTopicPartition.
type DescribeQuorumResponseTopicPartitionReplicaState ¶
type DescribeQuorumResponseTopicPartitionReplicaState struct { ReplicaID int32 // The last known log end offset of the follower, or -1 if it is unknown. LogEndOffset int64 }
A common struct used in DescribeQuorumResponse.
func NewDescribeQuorumResponseTopicPartitionReplicaState ¶
func NewDescribeQuorumResponseTopicPartitionReplicaState() DescribeQuorumResponseTopicPartitionReplicaState
NewDescribeQuorumResponseTopicPartitionReplicaState returns a default DescribeQuorumResponseTopicPartitionReplicaState This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeQuorumResponseTopicPartitionReplicaState) Default ¶
func (v *DescribeQuorumResponseTopicPartitionReplicaState) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeQuorumResponseTopicPartitionReplicaState.
type DescribeTransactionsRequest ¶ added in v0.6.10
type DescribeTransactionsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Array of transactionalIds to include in describe results. If empty, then // no results will be returned. TransactionalIDs []string }
For KIP-664, DescribeTransactionsRequest describes the state of transactions.
func NewDescribeTransactionsRequest ¶ added in v0.6.10
func NewDescribeTransactionsRequest() DescribeTransactionsRequest
NewDescribeTransactionsRequest returns a default DescribeTransactionsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeTransactionsRequest ¶ added in v0.6.10
func NewPtrDescribeTransactionsRequest() *DescribeTransactionsRequest
NewPtrDescribeTransactionsRequest returns a pointer to a default DescribeTransactionsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeTransactionsRequest) AppendTo ¶ added in v0.6.10
func (v *DescribeTransactionsRequest) AppendTo(dst []byte) []byte
func (*DescribeTransactionsRequest) Default ¶ added in v0.6.10
func (v *DescribeTransactionsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeTransactionsRequest.
func (*DescribeTransactionsRequest) GetVersion ¶ added in v0.6.10
func (v *DescribeTransactionsRequest) GetVersion() int16
func (*DescribeTransactionsRequest) IsFlexible ¶ added in v0.6.10
func (v *DescribeTransactionsRequest) IsFlexible() bool
func (*DescribeTransactionsRequest) Key ¶ added in v0.6.10
func (*DescribeTransactionsRequest) Key() int16
func (*DescribeTransactionsRequest) MaxVersion ¶ added in v0.6.10
func (*DescribeTransactionsRequest) MaxVersion() int16
func (*DescribeTransactionsRequest) ReadFrom ¶ added in v0.6.10
func (v *DescribeTransactionsRequest) ReadFrom(src []byte) error
func (*DescribeTransactionsRequest) RequestWith ¶ added in v0.6.10
func (v *DescribeTransactionsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeTransactionsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeTransactionsRequest) ResponseKind ¶ added in v0.6.10
func (v *DescribeTransactionsRequest) ResponseKind() Response
func (*DescribeTransactionsRequest) SetVersion ¶ added in v0.6.10
func (v *DescribeTransactionsRequest) SetVersion(version int16)
type DescribeTransactionsResponse ¶ added in v0.6.10
type DescribeTransactionsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 TransactionStates []DescribeTransactionsResponseTransactionState }
DescribeTransactionsResponse is a response to a DescribeTransactionsRequest.
func NewDescribeTransactionsResponse ¶ added in v0.6.10
func NewDescribeTransactionsResponse() DescribeTransactionsResponse
NewDescribeTransactionsResponse returns a default DescribeTransactionsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeTransactionsResponse ¶ added in v0.6.10
func NewPtrDescribeTransactionsResponse() *DescribeTransactionsResponse
NewPtrDescribeTransactionsResponse returns a pointer to a default DescribeTransactionsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeTransactionsResponse) AppendTo ¶ added in v0.6.10
func (v *DescribeTransactionsResponse) AppendTo(dst []byte) []byte
func (*DescribeTransactionsResponse) Default ¶ added in v0.6.10
func (v *DescribeTransactionsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeTransactionsResponse.
func (*DescribeTransactionsResponse) GetVersion ¶ added in v0.6.10
func (v *DescribeTransactionsResponse) GetVersion() int16
func (*DescribeTransactionsResponse) IsFlexible ¶ added in v0.6.10
func (v *DescribeTransactionsResponse) IsFlexible() bool
func (*DescribeTransactionsResponse) Key ¶ added in v0.6.10
func (*DescribeTransactionsResponse) Key() int16
func (*DescribeTransactionsResponse) MaxVersion ¶ added in v0.6.10
func (*DescribeTransactionsResponse) MaxVersion() int16
func (*DescribeTransactionsResponse) ReadFrom ¶ added in v0.6.10
func (v *DescribeTransactionsResponse) ReadFrom(src []byte) error
func (*DescribeTransactionsResponse) RequestKind ¶ added in v0.6.10
func (v *DescribeTransactionsResponse) RequestKind() Request
func (*DescribeTransactionsResponse) SetVersion ¶ added in v0.6.10
func (v *DescribeTransactionsResponse) SetVersion(version int16)
func (*DescribeTransactionsResponse) Throttle ¶ added in v0.6.10
func (v *DescribeTransactionsResponse) Throttle() (int32, bool)
type DescribeTransactionsResponseTransactionState ¶ added in v0.6.10
type DescribeTransactionsResponseTransactionState struct { // A potential error code for describing this transaction. // // NOT_COORDINATOR is returned if the broker receiving this transactional // ID does not own the ID. // // COORDINATOR_LOAD_IN_PROGRESS is returned if the coordiantor is laoding. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is being shutdown. // // TRANSACTIONAL_ID_NOT_FOUND is returned if the transactional ID could not be found. // // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned if the user does not have // Describe permissions on the transactional ID. ErrorCode int16 // TransactionalID is the transactional ID this record is for. TransactionalID string // State is the state the transaction is in. State string // TimeoutMillis is the timeout of this transaction in milliseconds. TimeoutMillis int32 // StartTimestamp is the timestamp in millis of when this transaction started. StartTimestamp int64 // ProducerID is the ID in use by the transactional ID. ProducerID int64 // ProducerEpoch is the epoch associated with the producer ID. ProducerEpoch int16 // The set of partitions included in the current transaction (if active). // When a transaction is preparing to commit or abort, this will include // only partitions which do not have markers. // // This does not include topics the user is not authorized to describe. Topics []DescribeTransactionsResponseTransactionStateTopic }
func NewDescribeTransactionsResponseTransactionState ¶ added in v0.6.10
func NewDescribeTransactionsResponseTransactionState() DescribeTransactionsResponseTransactionState
NewDescribeTransactionsResponseTransactionState returns a default DescribeTransactionsResponseTransactionState This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeTransactionsResponseTransactionState) Default ¶ added in v0.6.10
func (v *DescribeTransactionsResponseTransactionState) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeTransactionsResponseTransactionState.
type DescribeTransactionsResponseTransactionStateTopic ¶ added in v0.6.10
func NewDescribeTransactionsResponseTransactionStateTopic ¶ added in v0.6.10
func NewDescribeTransactionsResponseTransactionStateTopic() DescribeTransactionsResponseTransactionStateTopic
NewDescribeTransactionsResponseTransactionStateTopic returns a default DescribeTransactionsResponseTransactionStateTopic This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeTransactionsResponseTransactionStateTopic) Default ¶ added in v0.6.10
func (v *DescribeTransactionsResponseTransactionStateTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeTransactionsResponseTransactionStateTopic.
type DescribeUserSCRAMCredentialsRequest ¶
type DescribeUserSCRAMCredentialsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The users to describe, or null to describe all. Users []DescribeUserSCRAMCredentialsRequestUser }
DescribeUserSCRAMCredentialsRequest, proposed in KIP-554 and introduced with Kafka 2.7.0, describes user SCRAM credentials.
This request was introduced as part of the overarching KIP-500 initiative, which is to remove Zookeeper as a dependency.
This request requires DESCRIBE on CLUSTER.
func NewDescribeUserSCRAMCredentialsRequest ¶
func NewDescribeUserSCRAMCredentialsRequest() DescribeUserSCRAMCredentialsRequest
NewDescribeUserSCRAMCredentialsRequest returns a default DescribeUserSCRAMCredentialsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeUserSCRAMCredentialsRequest ¶
func NewPtrDescribeUserSCRAMCredentialsRequest() *DescribeUserSCRAMCredentialsRequest
NewPtrDescribeUserSCRAMCredentialsRequest returns a pointer to a default DescribeUserSCRAMCredentialsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeUserSCRAMCredentialsRequest) AppendTo ¶
func (v *DescribeUserSCRAMCredentialsRequest) AppendTo(dst []byte) []byte
func (*DescribeUserSCRAMCredentialsRequest) Default ¶
func (v *DescribeUserSCRAMCredentialsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeUserSCRAMCredentialsRequest.
func (*DescribeUserSCRAMCredentialsRequest) GetVersion ¶
func (v *DescribeUserSCRAMCredentialsRequest) GetVersion() int16
func (*DescribeUserSCRAMCredentialsRequest) IsFlexible ¶
func (v *DescribeUserSCRAMCredentialsRequest) IsFlexible() bool
func (*DescribeUserSCRAMCredentialsRequest) Key ¶
func (*DescribeUserSCRAMCredentialsRequest) Key() int16
func (*DescribeUserSCRAMCredentialsRequest) MaxVersion ¶
func (*DescribeUserSCRAMCredentialsRequest) MaxVersion() int16
func (*DescribeUserSCRAMCredentialsRequest) ReadFrom ¶
func (v *DescribeUserSCRAMCredentialsRequest) ReadFrom(src []byte) error
func (*DescribeUserSCRAMCredentialsRequest) RequestWith ¶
func (v *DescribeUserSCRAMCredentialsRequest) RequestWith(ctx context.Context, r Requestor) (*DescribeUserSCRAMCredentialsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*DescribeUserSCRAMCredentialsRequest) ResponseKind ¶
func (v *DescribeUserSCRAMCredentialsRequest) ResponseKind() Response
func (*DescribeUserSCRAMCredentialsRequest) SetVersion ¶
func (v *DescribeUserSCRAMCredentialsRequest) SetVersion(version int16)
type DescribeUserSCRAMCredentialsRequestUser ¶
type DescribeUserSCRAMCredentialsRequestUser struct { // The user name. Name string }
func NewDescribeUserSCRAMCredentialsRequestUser ¶
func NewDescribeUserSCRAMCredentialsRequestUser() DescribeUserSCRAMCredentialsRequestUser
NewDescribeUserSCRAMCredentialsRequestUser returns a default DescribeUserSCRAMCredentialsRequestUser This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeUserSCRAMCredentialsRequestUser) Default ¶
func (v *DescribeUserSCRAMCredentialsRequestUser) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeUserSCRAMCredentialsRequestUser.
type DescribeUserSCRAMCredentialsResponse ¶
type DescribeUserSCRAMCredentialsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // The request-level error code. This is 0 except for user or infra issues. ErrorCode int16 // The request-level error message, if any. ErrorMessage *string // Results for descriptions, one per user. Results []DescribeUserSCRAMCredentialsResponseResult }
DescribeUserSCRAMCredentialsResponse is a response for a DescribeUserSCRAMCredentialsRequest.
func NewDescribeUserSCRAMCredentialsResponse ¶
func NewDescribeUserSCRAMCredentialsResponse() DescribeUserSCRAMCredentialsResponse
NewDescribeUserSCRAMCredentialsResponse returns a default DescribeUserSCRAMCredentialsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrDescribeUserSCRAMCredentialsResponse ¶
func NewPtrDescribeUserSCRAMCredentialsResponse() *DescribeUserSCRAMCredentialsResponse
NewPtrDescribeUserSCRAMCredentialsResponse returns a pointer to a default DescribeUserSCRAMCredentialsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*DescribeUserSCRAMCredentialsResponse) AppendTo ¶
func (v *DescribeUserSCRAMCredentialsResponse) AppendTo(dst []byte) []byte
func (*DescribeUserSCRAMCredentialsResponse) Default ¶
func (v *DescribeUserSCRAMCredentialsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeUserSCRAMCredentialsResponse.
func (*DescribeUserSCRAMCredentialsResponse) GetVersion ¶
func (v *DescribeUserSCRAMCredentialsResponse) GetVersion() int16
func (*DescribeUserSCRAMCredentialsResponse) IsFlexible ¶
func (v *DescribeUserSCRAMCredentialsResponse) IsFlexible() bool
func (*DescribeUserSCRAMCredentialsResponse) Key ¶
func (*DescribeUserSCRAMCredentialsResponse) Key() int16
func (*DescribeUserSCRAMCredentialsResponse) MaxVersion ¶
func (*DescribeUserSCRAMCredentialsResponse) MaxVersion() int16
func (*DescribeUserSCRAMCredentialsResponse) ReadFrom ¶
func (v *DescribeUserSCRAMCredentialsResponse) ReadFrom(src []byte) error
func (*DescribeUserSCRAMCredentialsResponse) RequestKind ¶
func (v *DescribeUserSCRAMCredentialsResponse) RequestKind() Request
func (*DescribeUserSCRAMCredentialsResponse) SetVersion ¶
func (v *DescribeUserSCRAMCredentialsResponse) SetVersion(version int16)
func (*DescribeUserSCRAMCredentialsResponse) Throttle ¶ added in v0.6.2
func (v *DescribeUserSCRAMCredentialsResponse) Throttle() (int32, bool)
type DescribeUserSCRAMCredentialsResponseResult ¶
type DescribeUserSCRAMCredentialsResponseResult struct { // The name this result corresponds to. User string // The user-level error code. ErrorCode int16 // The user-level error message, if any. ErrorMessage *string // Information about the SCRAM credentials for this user. CredentialInfos []DescribeUserSCRAMCredentialsResponseResultCredentialInfo }
func NewDescribeUserSCRAMCredentialsResponseResult ¶
func NewDescribeUserSCRAMCredentialsResponseResult() DescribeUserSCRAMCredentialsResponseResult
NewDescribeUserSCRAMCredentialsResponseResult returns a default DescribeUserSCRAMCredentialsResponseResult This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeUserSCRAMCredentialsResponseResult) Default ¶
func (v *DescribeUserSCRAMCredentialsResponseResult) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeUserSCRAMCredentialsResponseResult.
type DescribeUserSCRAMCredentialsResponseResultCredentialInfo ¶
type DescribeUserSCRAMCredentialsResponseResultCredentialInfo struct { // The SCRAM mechanism for this user, where 0 is UNKNOWN, 1 is SCRAM-SHA-256, // and 2 is SCRAM-SHA-512. Mechanism int8 // The number of iterations used in the SCRAM credential. Iterations int32 }
func NewDescribeUserSCRAMCredentialsResponseResultCredentialInfo ¶
func NewDescribeUserSCRAMCredentialsResponseResultCredentialInfo() DescribeUserSCRAMCredentialsResponseResultCredentialInfo
NewDescribeUserSCRAMCredentialsResponseResultCredentialInfo returns a default DescribeUserSCRAMCredentialsResponseResultCredentialInfo This is a shortcut for creating a struct and calling Default yourself.
func (*DescribeUserSCRAMCredentialsResponseResultCredentialInfo) Default ¶
func (v *DescribeUserSCRAMCredentialsResponseResultCredentialInfo) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to DescribeUserSCRAMCredentialsResponseResultCredentialInfo.
type ElectLeadersRequest ¶
type ElectLeadersRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // ElectionType is the type of election to conduct. 0 elects the preferred // replica, 1 elects the first live replica if there are no in-sync replicas // (i.e., unclean leader election). ElectionType int8 // v1+ // Topics is an array of topics and corresponding partitions to // trigger leader elections for, or null for all. Topics []ElectLeadersRequestTopic // TimeoutMillis is how long to wait for the response. This limits how long to // wait since responses are not sent until election results are complete. TimeoutMillis int32 }
ElectLeadersRequest begins a leader election for all given topic partitions. This request was added in Kafka 2.2.0 to replace the zookeeper only option of triggering leader elections before. See KIP-183 for more details. KIP-460 introduced the ElectionType field with Kafka 2.4.0.
func NewElectLeadersRequest ¶
func NewElectLeadersRequest() ElectLeadersRequest
NewElectLeadersRequest returns a default ElectLeadersRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrElectLeadersRequest ¶
func NewPtrElectLeadersRequest() *ElectLeadersRequest
NewPtrElectLeadersRequest returns a pointer to a default ElectLeadersRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ElectLeadersRequest) AppendTo ¶
func (v *ElectLeadersRequest) AppendTo(dst []byte) []byte
func (*ElectLeadersRequest) Default ¶
func (v *ElectLeadersRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ElectLeadersRequest.
func (*ElectLeadersRequest) GetVersion ¶
func (v *ElectLeadersRequest) GetVersion() int16
func (*ElectLeadersRequest) IsAdminRequest ¶
func (v *ElectLeadersRequest) IsAdminRequest()
func (*ElectLeadersRequest) IsFlexible ¶
func (v *ElectLeadersRequest) IsFlexible() bool
func (*ElectLeadersRequest) Key ¶
func (*ElectLeadersRequest) Key() int16
func (*ElectLeadersRequest) MaxVersion ¶
func (*ElectLeadersRequest) MaxVersion() int16
func (*ElectLeadersRequest) ReadFrom ¶
func (v *ElectLeadersRequest) ReadFrom(src []byte) error
func (*ElectLeadersRequest) RequestWith ¶
func (v *ElectLeadersRequest) RequestWith(ctx context.Context, r Requestor) (*ElectLeadersResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ElectLeadersRequest) ResponseKind ¶
func (v *ElectLeadersRequest) ResponseKind() Response
func (*ElectLeadersRequest) SetVersion ¶
func (v *ElectLeadersRequest) SetVersion(version int16)
type ElectLeadersRequestTopic ¶
type ElectLeadersRequestTopic struct { // Topic is a topic to trigger leader elections for (but only for the // partitions below). Topic string // Partitions is an array of partitions in a topic to trigger leader // elections for. Partitions []int32 }
func NewElectLeadersRequestTopic ¶
func NewElectLeadersRequestTopic() ElectLeadersRequestTopic
NewElectLeadersRequestTopic returns a default ElectLeadersRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*ElectLeadersRequestTopic) Default ¶
func (v *ElectLeadersRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ElectLeadersRequestTopic.
type ElectLeadersResponse ¶
type ElectLeadersResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // ErrorCode is any error that applies to all partitions. // // CLUSTER_AUTHORIZATION_FAILED is returned if the client is not // authorized to reassign partitions. ErrorCode int16 // v1+ // Topics contains leader election results for each requested topic. Topics []ElectLeadersResponseTopic }
ElectLeadersResponse is a response for an ElectLeadersRequest.
func NewElectLeadersResponse ¶
func NewElectLeadersResponse() ElectLeadersResponse
NewElectLeadersResponse returns a default ElectLeadersResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrElectLeadersResponse ¶
func NewPtrElectLeadersResponse() *ElectLeadersResponse
NewPtrElectLeadersResponse returns a pointer to a default ElectLeadersResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ElectLeadersResponse) AppendTo ¶
func (v *ElectLeadersResponse) AppendTo(dst []byte) []byte
func (*ElectLeadersResponse) Default ¶
func (v *ElectLeadersResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ElectLeadersResponse.
func (*ElectLeadersResponse) GetVersion ¶
func (v *ElectLeadersResponse) GetVersion() int16
func (*ElectLeadersResponse) IsFlexible ¶
func (v *ElectLeadersResponse) IsFlexible() bool
func (*ElectLeadersResponse) Key ¶
func (*ElectLeadersResponse) Key() int16
func (*ElectLeadersResponse) MaxVersion ¶
func (*ElectLeadersResponse) MaxVersion() int16
func (*ElectLeadersResponse) ReadFrom ¶
func (v *ElectLeadersResponse) ReadFrom(src []byte) error
func (*ElectLeadersResponse) RequestKind ¶
func (v *ElectLeadersResponse) RequestKind() Request
func (*ElectLeadersResponse) SetVersion ¶
func (v *ElectLeadersResponse) SetVersion(version int16)
func (*ElectLeadersResponse) Throttle ¶ added in v0.6.2
func (v *ElectLeadersResponse) Throttle() (int32, bool)
type ElectLeadersResponseTopic ¶
type ElectLeadersResponseTopic struct { // Topic is topic for the given partition results below. Topic string // Partitions contains election results for a topic's partitions. Partitions []ElectLeadersResponseTopicPartition }
func NewElectLeadersResponseTopic ¶
func NewElectLeadersResponseTopic() ElectLeadersResponseTopic
NewElectLeadersResponseTopic returns a default ElectLeadersResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*ElectLeadersResponseTopic) Default ¶
func (v *ElectLeadersResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ElectLeadersResponseTopic.
type ElectLeadersResponseTopicPartition ¶
type ElectLeadersResponseTopicPartition struct { // Partition is the partition for this result. Partition int32 // ErrorCode is the error code returned for this topic/partition leader // election. // // CLUSTER_AUTHORIZATION_FAILED is returned if the client is not // authorized to trigger leader elections. // // NOT_CONTROLLER is returned if the request was not issued to a Kafka // controller. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the topic/partition does // not exist on any broker in the cluster (this is slightly different // from the usual meaning of a single broker not knowing of the topic // partition). // // PREFERRED_LEADER_NOT_AVAILABLE is returned if the preferred leader // could not be elected (for example, the preferred leader was not in // the ISR). ErrorCode int16 // ErrorMessage is an informative message if the leader election failed. ErrorMessage *string }
func NewElectLeadersResponseTopicPartition ¶
func NewElectLeadersResponseTopicPartition() ElectLeadersResponseTopicPartition
NewElectLeadersResponseTopicPartition returns a default ElectLeadersResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*ElectLeadersResponseTopicPartition) Default ¶
func (v *ElectLeadersResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ElectLeadersResponseTopicPartition.
type EndQuorumEpochRequest ¶
type EndQuorumEpochRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 ClusterID *string Topics []EndQuorumEpochRequestTopic }
Part of KIP-595 to replace Kafka's dependence on Zookeeper with a Kafka-only raft protocol, EndQuorumEpochRequest is sent by a leader to gracefully step down as leader (i.e. on shutdown). Stepping down begins a new election.
Since this is relatively Kafka internal, most fields are left undocumented.
func NewEndQuorumEpochRequest ¶
func NewEndQuorumEpochRequest() EndQuorumEpochRequest
NewEndQuorumEpochRequest returns a default EndQuorumEpochRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrEndQuorumEpochRequest ¶
func NewPtrEndQuorumEpochRequest() *EndQuorumEpochRequest
NewPtrEndQuorumEpochRequest returns a pointer to a default EndQuorumEpochRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*EndQuorumEpochRequest) AppendTo ¶
func (v *EndQuorumEpochRequest) AppendTo(dst []byte) []byte
func (*EndQuorumEpochRequest) Default ¶
func (v *EndQuorumEpochRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndQuorumEpochRequest.
func (*EndQuorumEpochRequest) GetVersion ¶
func (v *EndQuorumEpochRequest) GetVersion() int16
func (*EndQuorumEpochRequest) IsAdminRequest ¶
func (v *EndQuorumEpochRequest) IsAdminRequest()
func (*EndQuorumEpochRequest) IsFlexible ¶
func (v *EndQuorumEpochRequest) IsFlexible() bool
func (*EndQuorumEpochRequest) Key ¶
func (*EndQuorumEpochRequest) Key() int16
func (*EndQuorumEpochRequest) MaxVersion ¶
func (*EndQuorumEpochRequest) MaxVersion() int16
func (*EndQuorumEpochRequest) ReadFrom ¶
func (v *EndQuorumEpochRequest) ReadFrom(src []byte) error
func (*EndQuorumEpochRequest) RequestWith ¶
func (v *EndQuorumEpochRequest) RequestWith(ctx context.Context, r Requestor) (*EndQuorumEpochResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*EndQuorumEpochRequest) ResponseKind ¶
func (v *EndQuorumEpochRequest) ResponseKind() Response
func (*EndQuorumEpochRequest) SetVersion ¶
func (v *EndQuorumEpochRequest) SetVersion(version int16)
type EndQuorumEpochRequestTopic ¶
type EndQuorumEpochRequestTopic struct { Topic string Partitions []EndQuorumEpochRequestTopicPartition }
func NewEndQuorumEpochRequestTopic ¶
func NewEndQuorumEpochRequestTopic() EndQuorumEpochRequestTopic
NewEndQuorumEpochRequestTopic returns a default EndQuorumEpochRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*EndQuorumEpochRequestTopic) Default ¶
func (v *EndQuorumEpochRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndQuorumEpochRequestTopic.
type EndQuorumEpochRequestTopicPartition ¶
type EndQuorumEpochRequestTopicPartition struct { Partition int32 // The current leader ID that is resigning. LeaderID int32 // The current epoch. LeaderEpoch int32 // A sorted list of preferred successors to start the election. PreferredSuccessors []int32 }
func NewEndQuorumEpochRequestTopicPartition ¶
func NewEndQuorumEpochRequestTopicPartition() EndQuorumEpochRequestTopicPartition
NewEndQuorumEpochRequestTopicPartition returns a default EndQuorumEpochRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*EndQuorumEpochRequestTopicPartition) Default ¶
func (v *EndQuorumEpochRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndQuorumEpochRequestTopicPartition.
type EndQuorumEpochResponse ¶
type EndQuorumEpochResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 ErrorCode int16 Topics []EndQuorumEpochResponseTopic }
func NewEndQuorumEpochResponse ¶
func NewEndQuorumEpochResponse() EndQuorumEpochResponse
NewEndQuorumEpochResponse returns a default EndQuorumEpochResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrEndQuorumEpochResponse ¶
func NewPtrEndQuorumEpochResponse() *EndQuorumEpochResponse
NewPtrEndQuorumEpochResponse returns a pointer to a default EndQuorumEpochResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*EndQuorumEpochResponse) AppendTo ¶
func (v *EndQuorumEpochResponse) AppendTo(dst []byte) []byte
func (*EndQuorumEpochResponse) Default ¶
func (v *EndQuorumEpochResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndQuorumEpochResponse.
func (*EndQuorumEpochResponse) GetVersion ¶
func (v *EndQuorumEpochResponse) GetVersion() int16
func (*EndQuorumEpochResponse) IsFlexible ¶
func (v *EndQuorumEpochResponse) IsFlexible() bool
func (*EndQuorumEpochResponse) Key ¶
func (*EndQuorumEpochResponse) Key() int16
func (*EndQuorumEpochResponse) MaxVersion ¶
func (*EndQuorumEpochResponse) MaxVersion() int16
func (*EndQuorumEpochResponse) ReadFrom ¶
func (v *EndQuorumEpochResponse) ReadFrom(src []byte) error
func (*EndQuorumEpochResponse) RequestKind ¶
func (v *EndQuorumEpochResponse) RequestKind() Request
func (*EndQuorumEpochResponse) SetVersion ¶
func (v *EndQuorumEpochResponse) SetVersion(version int16)
type EndQuorumEpochResponseTopic ¶
type EndQuorumEpochResponseTopic struct { Topic string Partitions []EndQuorumEpochResponseTopicPartition }
func NewEndQuorumEpochResponseTopic ¶
func NewEndQuorumEpochResponseTopic() EndQuorumEpochResponseTopic
NewEndQuorumEpochResponseTopic returns a default EndQuorumEpochResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*EndQuorumEpochResponseTopic) Default ¶
func (v *EndQuorumEpochResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndQuorumEpochResponseTopic.
type EndQuorumEpochResponseTopicPartition ¶
type EndQuorumEpochResponseTopicPartition struct { Partition int32 ErrorCode int16 // The ID of the current leader, or -1 if the leader is unknown. LeaderID int32 // The latest known leader epoch. LeaderEpoch int32 }
func NewEndQuorumEpochResponseTopicPartition ¶
func NewEndQuorumEpochResponseTopicPartition() EndQuorumEpochResponseTopicPartition
NewEndQuorumEpochResponseTopicPartition returns a default EndQuorumEpochResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*EndQuorumEpochResponseTopicPartition) Default ¶
func (v *EndQuorumEpochResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndQuorumEpochResponseTopicPartition.
type EndTxnMarker ¶ added in v0.6.10
EndTxnMarker is the value for a control record when the key is type 0 or 1.
func NewEndTxnMarker ¶ added in v0.6.10
func NewEndTxnMarker() EndTxnMarker
NewEndTxnMarker returns a default EndTxnMarker This is a shortcut for creating a struct and calling Default yourself.
func (*EndTxnMarker) AppendTo ¶ added in v0.6.10
func (v *EndTxnMarker) AppendTo(dst []byte) []byte
func (*EndTxnMarker) Default ¶ added in v0.6.10
func (v *EndTxnMarker) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndTxnMarker.
func (*EndTxnMarker) ReadFrom ¶ added in v0.6.10
func (v *EndTxnMarker) ReadFrom(src []byte) error
type EndTxnRequest ¶
type EndTxnRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TransactionalID is the transactional ID to use for this request. TransactionalID string // ProducerID is the producer ID of the client for this transactional ID // as received from InitProducerID. ProducerID int64 // ProducerEpoch is the producer epoch of the client for this transactional ID // as received from InitProducerID. ProducerEpoch int16 // Commit is whether to commit this transaction: true for yes, false for abort. Commit bool }
EndTxnRequest ends a transaction. This should be called after TxnOffsetCommitRequest.
func NewEndTxnRequest ¶
func NewEndTxnRequest() EndTxnRequest
NewEndTxnRequest returns a default EndTxnRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrEndTxnRequest ¶
func NewPtrEndTxnRequest() *EndTxnRequest
NewPtrEndTxnRequest returns a pointer to a default EndTxnRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*EndTxnRequest) AppendTo ¶
func (v *EndTxnRequest) AppendTo(dst []byte) []byte
func (*EndTxnRequest) Default ¶
func (v *EndTxnRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndTxnRequest.
func (*EndTxnRequest) GetVersion ¶
func (v *EndTxnRequest) GetVersion() int16
func (*EndTxnRequest) IsFlexible ¶
func (v *EndTxnRequest) IsFlexible() bool
func (*EndTxnRequest) IsTxnCoordinatorRequest ¶
func (v *EndTxnRequest) IsTxnCoordinatorRequest()
func (*EndTxnRequest) Key ¶
func (*EndTxnRequest) Key() int16
func (*EndTxnRequest) MaxVersion ¶
func (*EndTxnRequest) MaxVersion() int16
func (*EndTxnRequest) ReadFrom ¶
func (v *EndTxnRequest) ReadFrom(src []byte) error
func (*EndTxnRequest) RequestWith ¶
func (v *EndTxnRequest) RequestWith(ctx context.Context, r Requestor) (*EndTxnResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*EndTxnRequest) ResponseKind ¶
func (v *EndTxnRequest) ResponseKind() Response
func (*EndTxnRequest) SetVersion ¶
func (v *EndTxnRequest) SetVersion(version int16)
type EndTxnResponse ¶
type EndTxnResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // ErrorCode is any error for this topic/partition commit. // // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned if the client is // not authorized for write with transactional IDs with the requested // transactional ID. // // INVALID_REQUEST is returned if the transactional ID is invalid. // // INVALID_PRODUCER_ID_MAPPING is returned if the produce request used // a producer ID that is not tied to the transactional ID (i.e., mismatch // from what was returned from InitProducerID). // // INVALID_PRODUCER_EPOCH is returned if the requested epoch does not match // the broker epoch for this transactional ID. // // CONCURRENT_TRANSACTIONS is returned if there is an ongoing transaction for // this transactional ID, if the producer ID and epoch matches the broker's. // // INVALID_TXN_STATE is returned if this request is attempted at the wrong // time (given the order of how transaction requests should go). ErrorCode int16 }
EndTxnResponse is a response for an EndTxnRequest.
func NewEndTxnResponse ¶
func NewEndTxnResponse() EndTxnResponse
NewEndTxnResponse returns a default EndTxnResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrEndTxnResponse ¶
func NewPtrEndTxnResponse() *EndTxnResponse
NewPtrEndTxnResponse returns a pointer to a default EndTxnResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*EndTxnResponse) AppendTo ¶
func (v *EndTxnResponse) AppendTo(dst []byte) []byte
func (*EndTxnResponse) Default ¶
func (v *EndTxnResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EndTxnResponse.
func (*EndTxnResponse) GetVersion ¶
func (v *EndTxnResponse) GetVersion() int16
func (*EndTxnResponse) IsFlexible ¶
func (v *EndTxnResponse) IsFlexible() bool
func (*EndTxnResponse) Key ¶
func (*EndTxnResponse) Key() int16
func (*EndTxnResponse) MaxVersion ¶
func (*EndTxnResponse) MaxVersion() int16
func (*EndTxnResponse) ReadFrom ¶
func (v *EndTxnResponse) ReadFrom(src []byte) error
func (*EndTxnResponse) RequestKind ¶
func (v *EndTxnResponse) RequestKind() Request
func (*EndTxnResponse) SetVersion ¶
func (v *EndTxnResponse) SetVersion(version int16)
func (*EndTxnResponse) Throttle ¶ added in v0.6.2
func (v *EndTxnResponse) Throttle() (int32, bool)
type EnvelopeRequest ¶ added in v0.6.2
type EnvelopeRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The embedded request header and data. RequestData []byte // Value of the initial client principal when the request is redirected by a broker. RequestPrincipal []byte // The original client's address in bytes. ClientHostAddress []byte }
Introduced for KIP-590, EnvelopeRequest is what brokers use to wrap an incoming request before forwarding it to another broker.
func NewEnvelopeRequest ¶ added in v0.6.2
func NewEnvelopeRequest() EnvelopeRequest
NewEnvelopeRequest returns a default EnvelopeRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrEnvelopeRequest ¶ added in v0.6.2
func NewPtrEnvelopeRequest() *EnvelopeRequest
NewPtrEnvelopeRequest returns a pointer to a default EnvelopeRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*EnvelopeRequest) AppendTo ¶ added in v0.6.2
func (v *EnvelopeRequest) AppendTo(dst []byte) []byte
func (*EnvelopeRequest) Default ¶ added in v0.6.2
func (v *EnvelopeRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EnvelopeRequest.
func (*EnvelopeRequest) GetVersion ¶ added in v0.6.2
func (v *EnvelopeRequest) GetVersion() int16
func (*EnvelopeRequest) IsAdminRequest ¶ added in v0.6.2
func (v *EnvelopeRequest) IsAdminRequest()
func (*EnvelopeRequest) IsFlexible ¶ added in v0.6.2
func (v *EnvelopeRequest) IsFlexible() bool
func (*EnvelopeRequest) Key ¶ added in v0.6.2
func (*EnvelopeRequest) Key() int16
func (*EnvelopeRequest) MaxVersion ¶ added in v0.6.2
func (*EnvelopeRequest) MaxVersion() int16
func (*EnvelopeRequest) ReadFrom ¶ added in v0.6.2
func (v *EnvelopeRequest) ReadFrom(src []byte) error
func (*EnvelopeRequest) RequestWith ¶ added in v0.6.2
func (v *EnvelopeRequest) RequestWith(ctx context.Context, r Requestor) (*EnvelopeResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*EnvelopeRequest) ResponseKind ¶ added in v0.6.2
func (v *EnvelopeRequest) ResponseKind() Response
func (*EnvelopeRequest) SetVersion ¶ added in v0.6.2
func (v *EnvelopeRequest) SetVersion(version int16)
type EnvelopeResponse ¶ added in v0.6.2
type EnvelopeResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // The embedded response header and data. ResponseData []byte // The error code, or 0 if there was no error. // // NOT_CONTROLLER is returned when the request is not sent to the controller. // // CLUSTER_AUTHORIZATION_FAILED is returned if inter-broker authorization failed. ErrorCode int16 }
func NewEnvelopeResponse ¶ added in v0.6.2
func NewEnvelopeResponse() EnvelopeResponse
NewEnvelopeResponse returns a default EnvelopeResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrEnvelopeResponse ¶ added in v0.6.2
func NewPtrEnvelopeResponse() *EnvelopeResponse
NewPtrEnvelopeResponse returns a pointer to a default EnvelopeResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*EnvelopeResponse) AppendTo ¶ added in v0.6.2
func (v *EnvelopeResponse) AppendTo(dst []byte) []byte
func (*EnvelopeResponse) Default ¶ added in v0.6.2
func (v *EnvelopeResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to EnvelopeResponse.
func (*EnvelopeResponse) GetVersion ¶ added in v0.6.2
func (v *EnvelopeResponse) GetVersion() int16
func (*EnvelopeResponse) IsFlexible ¶ added in v0.6.2
func (v *EnvelopeResponse) IsFlexible() bool
func (*EnvelopeResponse) Key ¶ added in v0.6.2
func (*EnvelopeResponse) Key() int16
func (*EnvelopeResponse) MaxVersion ¶ added in v0.6.2
func (*EnvelopeResponse) MaxVersion() int16
func (*EnvelopeResponse) ReadFrom ¶ added in v0.6.2
func (v *EnvelopeResponse) ReadFrom(src []byte) error
func (*EnvelopeResponse) RequestKind ¶ added in v0.6.2
func (v *EnvelopeResponse) RequestKind() Request
func (*EnvelopeResponse) SetVersion ¶ added in v0.6.2
func (v *EnvelopeResponse) SetVersion(version int16)
type ExpireDelegationTokenRequest ¶
type ExpireDelegationTokenRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // HMAC is the HMAC of the token to change the expiry timestamp of. HMAC []byte // ExpiryPeriodMillis changes the delegation token's expiry timestamp to // now + expiry time millis. This can be used to force tokens to expiry // quickly, or to allow tokens a grace period before expiry. This can only // change the final expiry timestamp down; you cannot add enough time that // would increase the expiry timestamp. // // Note that you can change the expiry timestamp down and then back up, so // long as you change it back up before the timestamp expires. ExpiryPeriodMillis int64 }
ExpireDelegationTokenRequest is a request to change the expiry timestamp of a delegation token. Note that a client using a token cannot expire its own token.
func NewExpireDelegationTokenRequest ¶
func NewExpireDelegationTokenRequest() ExpireDelegationTokenRequest
NewExpireDelegationTokenRequest returns a default ExpireDelegationTokenRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrExpireDelegationTokenRequest ¶
func NewPtrExpireDelegationTokenRequest() *ExpireDelegationTokenRequest
NewPtrExpireDelegationTokenRequest returns a pointer to a default ExpireDelegationTokenRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ExpireDelegationTokenRequest) AppendTo ¶
func (v *ExpireDelegationTokenRequest) AppendTo(dst []byte) []byte
func (*ExpireDelegationTokenRequest) Default ¶
func (v *ExpireDelegationTokenRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ExpireDelegationTokenRequest.
func (*ExpireDelegationTokenRequest) GetVersion ¶
func (v *ExpireDelegationTokenRequest) GetVersion() int16
func (*ExpireDelegationTokenRequest) IsFlexible ¶
func (v *ExpireDelegationTokenRequest) IsFlexible() bool
func (*ExpireDelegationTokenRequest) Key ¶
func (*ExpireDelegationTokenRequest) Key() int16
func (*ExpireDelegationTokenRequest) MaxVersion ¶
func (*ExpireDelegationTokenRequest) MaxVersion() int16
func (*ExpireDelegationTokenRequest) ReadFrom ¶
func (v *ExpireDelegationTokenRequest) ReadFrom(src []byte) error
func (*ExpireDelegationTokenRequest) RequestWith ¶
func (v *ExpireDelegationTokenRequest) RequestWith(ctx context.Context, r Requestor) (*ExpireDelegationTokenResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ExpireDelegationTokenRequest) ResponseKind ¶
func (v *ExpireDelegationTokenRequest) ResponseKind() Response
func (*ExpireDelegationTokenRequest) SetVersion ¶
func (v *ExpireDelegationTokenRequest) SetVersion(version int16)
type ExpireDelegationTokenResponse ¶
type ExpireDelegationTokenResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ErrorCode is any error that caused the request to fail. ErrorCode int16 // ExpiryTimestamp is the new timestamp at which the delegation token will // expire. ExpiryTimestamp int64 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 }
ExpireDelegationTokenResponse is a response to an ExpireDelegationTokenRequest.
func NewExpireDelegationTokenResponse ¶
func NewExpireDelegationTokenResponse() ExpireDelegationTokenResponse
NewExpireDelegationTokenResponse returns a default ExpireDelegationTokenResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrExpireDelegationTokenResponse ¶
func NewPtrExpireDelegationTokenResponse() *ExpireDelegationTokenResponse
NewPtrExpireDelegationTokenResponse returns a pointer to a default ExpireDelegationTokenResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ExpireDelegationTokenResponse) AppendTo ¶
func (v *ExpireDelegationTokenResponse) AppendTo(dst []byte) []byte
func (*ExpireDelegationTokenResponse) Default ¶
func (v *ExpireDelegationTokenResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ExpireDelegationTokenResponse.
func (*ExpireDelegationTokenResponse) GetVersion ¶
func (v *ExpireDelegationTokenResponse) GetVersion() int16
func (*ExpireDelegationTokenResponse) IsFlexible ¶
func (v *ExpireDelegationTokenResponse) IsFlexible() bool
func (*ExpireDelegationTokenResponse) Key ¶
func (*ExpireDelegationTokenResponse) Key() int16
func (*ExpireDelegationTokenResponse) MaxVersion ¶
func (*ExpireDelegationTokenResponse) MaxVersion() int16
func (*ExpireDelegationTokenResponse) ReadFrom ¶
func (v *ExpireDelegationTokenResponse) ReadFrom(src []byte) error
func (*ExpireDelegationTokenResponse) RequestKind ¶
func (v *ExpireDelegationTokenResponse) RequestKind() Request
func (*ExpireDelegationTokenResponse) SetVersion ¶
func (v *ExpireDelegationTokenResponse) SetVersion(version int16)
func (*ExpireDelegationTokenResponse) Throttle ¶ added in v0.6.2
func (v *ExpireDelegationTokenResponse) Throttle() (int32, bool)
type FetchRequest ¶
type FetchRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The cluster ID, if known. This is used to validate metadata fetches // prior to broker registration. ClusterID *string // tag 0 // ReplicaID is the broker ID of performing the fetch request. Standard // clients should use -1. To be a "debug" replica, use -2. The debug // replica can be used to fetch messages from non-leaders. ReplicaID int32 // MaxWaitMillis is how long to wait for MinBytes to be hit before a broker // responds to a fetch request. MaxWaitMillis int32 // MinBytes is the minimum amount of bytes to attempt to read before a broker // responds to a fetch request. MinBytes int32 // MaxBytes is the maximum amount of bytes to read in a fetch request. The // response can exceed MaxBytes if the first record in the first non-empty // partition is larger than MaxBytes. MaxBytes int32 // v3+ // IsolationLevel changes which messages are fetched. Follower replica ID's // (non-negative, non-standard-client) fetch from the end. // // Standard clients fetch from the high watermark, which corresponds to // IsolationLevel 0, READ_UNCOMMITTED. // // To only read committed records, use IsolationLevel 1, corresponding to // READ_COMMITTED. IsolationLevel int8 // v4+ // SessionID is used to potentially reduce the amount of back and forth // data between a client and a broker. If opting in to sessions, the first // ID used should be 0, and thereafter (until session resets) the ID should // be the ID returned in the fetch response. // // Read KIP-227 for more details. Use -1 if you want to disable sessions. SessionID int32 // v7+ // SessionEpoch is the session epoch for this request if using sessions. // // Read KIP-227 for more details. Use -1 if you are not using sessions. SessionEpoch int32 // v7+ // Topic contains topics to try to fetch records for. Topics []FetchRequestTopic // ForgottenTopics contains topics and partitions that a fetch session // wants to remove from its session. // // See KIP-227 for more details. ForgottenTopics []FetchRequestForgottenTopic // v7+ // Rack of the consumer making this request (see KIP-392; introduced in // Kafka 2.2.0). Rack string // v11+ }
FetchRequest is a long-poll request of records from Kafka.
Kafka 0.11.0.0 released v4 and changed the returned RecordBatches to contain the RecordBatch type. Prior, Kafka used the MessageSet type (and, for v0 and v1, Kafka used a different type).
Note that starting in v3, Kafka began processing partitions in order, meaning the order of partitions in the fetch request is important due to potential size constraints.
func NewFetchRequest ¶
func NewFetchRequest() FetchRequest
NewFetchRequest returns a default FetchRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrFetchRequest ¶
func NewPtrFetchRequest() *FetchRequest
NewPtrFetchRequest returns a pointer to a default FetchRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*FetchRequest) AppendTo ¶
func (v *FetchRequest) AppendTo(dst []byte) []byte
func (*FetchRequest) Default ¶
func (v *FetchRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchRequest.
func (*FetchRequest) GetVersion ¶
func (v *FetchRequest) GetVersion() int16
func (*FetchRequest) IsFlexible ¶
func (v *FetchRequest) IsFlexible() bool
func (*FetchRequest) Key ¶
func (*FetchRequest) Key() int16
func (*FetchRequest) MaxVersion ¶
func (*FetchRequest) MaxVersion() int16
func (*FetchRequest) ReadFrom ¶
func (v *FetchRequest) ReadFrom(src []byte) error
func (*FetchRequest) RequestWith ¶
func (v *FetchRequest) RequestWith(ctx context.Context, r Requestor) (*FetchResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*FetchRequest) ResponseKind ¶
func (v *FetchRequest) ResponseKind() Response
func (*FetchRequest) SetVersion ¶
func (v *FetchRequest) SetVersion(version int16)
type FetchRequestForgottenTopic ¶
type FetchRequestForgottenTopic struct { // Topic is a topic to remove from being tracked (with the partitions below). Topic string // Partitions are partitions to remove from tracking for a topic. Partitions []int32 }
func NewFetchRequestForgottenTopic ¶
func NewFetchRequestForgottenTopic() FetchRequestForgottenTopic
NewFetchRequestForgottenTopic returns a default FetchRequestForgottenTopic This is a shortcut for creating a struct and calling Default yourself.
func (*FetchRequestForgottenTopic) Default ¶
func (v *FetchRequestForgottenTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchRequestForgottenTopic.
type FetchRequestTopic ¶
type FetchRequestTopic struct { // Topic is a topic to try to fetch records for. Topic string // Partitions contains partitions in a topic to try to fetch records for. Partitions []FetchRequestTopicPartition }
func NewFetchRequestTopic ¶
func NewFetchRequestTopic() FetchRequestTopic
NewFetchRequestTopic returns a default FetchRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*FetchRequestTopic) Default ¶
func (v *FetchRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchRequestTopic.
type FetchRequestTopicPartition ¶
type FetchRequestTopicPartition struct { // Partition is a partition in a topic to try to fetch records for. Partition int32 // CurrentLeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0, // allows brokers to check if the client is fenced (has an out of date // leader) or is using an unknown leader. // // The initial leader epoch can be determined from a MetadataResponse. // To skip log truncation checking, use -1. CurrentLeaderEpoch int32 // v9+ // FetchOffset is the offset to begin the fetch from. Kafka will // return records at and after this offset. FetchOffset int64 // The epoch of the last fetched record, or -1 if there is none. LastFetchedEpoch int32 // v12+ // LogStartOffset is a broker-follower only field added for KIP-107. // This is the start offset of the partition in a follower. LogStartOffset int64 // v5+ // PartitionMaxBytes is the maximum bytes to return for this partition. // This can be used to limit how many bytes an individual partition in // a request is allotted so that it does not dominate all of MaxBytes. PartitionMaxBytes int32 }
func NewFetchRequestTopicPartition ¶
func NewFetchRequestTopicPartition() FetchRequestTopicPartition
NewFetchRequestTopicPartition returns a default FetchRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*FetchRequestTopicPartition) Default ¶
func (v *FetchRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchRequestTopicPartition.
type FetchResponse ¶
type FetchResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 8. ThrottleMillis int32 // v1+ // ErrorCode is a full-response error code for a fetch request. This was // added in support of KIP-227. This error is only non-zero if using fetch // sessions. // // FETCH_SESSION_ID_NOT_FOUND is returned if the request used a // session ID that the broker does not know of. // // INVALID_FETCH_SESSION_EPOCH is returned if the request used an // invalid session epoch. ErrorCode int16 // v7+ // SessionID is the id for this session if using sessions. // // See KIP-227 for more details. SessionID int32 // v7+ // Topics contains an array of topic partitions and the records received // for them. Topics []FetchResponseTopic }
FetchResponse is returned from a FetchRequest.
func NewFetchResponse ¶
func NewFetchResponse() FetchResponse
NewFetchResponse returns a default FetchResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrFetchResponse ¶
func NewPtrFetchResponse() *FetchResponse
NewPtrFetchResponse returns a pointer to a default FetchResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*FetchResponse) AppendTo ¶
func (v *FetchResponse) AppendTo(dst []byte) []byte
func (*FetchResponse) Default ¶
func (v *FetchResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchResponse.
func (*FetchResponse) GetVersion ¶
func (v *FetchResponse) GetVersion() int16
func (*FetchResponse) IsFlexible ¶
func (v *FetchResponse) IsFlexible() bool
func (*FetchResponse) Key ¶
func (*FetchResponse) Key() int16
func (*FetchResponse) MaxVersion ¶
func (*FetchResponse) MaxVersion() int16
func (*FetchResponse) ReadFrom ¶
func (v *FetchResponse) ReadFrom(src []byte) error
func (*FetchResponse) RequestKind ¶
func (v *FetchResponse) RequestKind() Request
func (*FetchResponse) SetVersion ¶
func (v *FetchResponse) SetVersion(version int16)
func (*FetchResponse) Throttle ¶ added in v0.6.2
func (v *FetchResponse) Throttle() (int32, bool)
type FetchResponseTopic ¶
type FetchResponseTopic struct { // Topic is a topic that records may have been received for. Topic string // Partitions contains partitions in a topic that records may have // been received for. Partitions []FetchResponseTopicPartition }
func NewFetchResponseTopic ¶
func NewFetchResponseTopic() FetchResponseTopic
NewFetchResponseTopic returns a default FetchResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*FetchResponseTopic) Default ¶
func (v *FetchResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchResponseTopic.
type FetchResponseTopicPartition ¶
type FetchResponseTopicPartition struct { // Partition is a partition in a topic that records may have been // received for. Partition int32 // ErrorCode is an error returned for an individual partition in a // fetch request. // // TOPIC_AUTHORIZATION_FAILED is returned if the client is not // authorized to read the partition. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the topic or partition // does not exist on this broker. // // UNSUPPORTED_COMPRESSION_TYPE is returned if the request version was // under 10 and the batch is compressed with zstd. // // UNSUPPORTED_VERSION is returned if the broker has records newer than // the client can support (magic value) and the broker has disabled // message downconversion. // // NOT_LEADER_FOR_PARTITION is returned if requesting data for this // partition as a follower (non-negative ReplicaID) and the broker // is not the leader for this partition. // // REPLICA_NOT_AVAILABLE is returned if the partition exists but // the requested broker is not the leader for it. // // KAFKA_STORAGE_EXCEPTION is returned if the requested partition is // offline. // // UNKNOWN_LEADER_EPOCH is returned if the request used a larger leader // epoch than the broker knows of. // // FENCED_LEADER_EPOCH is returned if the request used a smaller leader // epoch than the broker is at (see KIP-320). // // OFFSET_OUT_OF_RANGE is returned if requesting an offset past the // current end offset or before the beginning offset. ErrorCode int16 // HighWatermark is the current high watermark for this partition, // that is, the current offset that is on all in sync replicas. HighWatermark int64 // LastStableOffset is the offset at which all prior offsets have // been "decided". Non transactional records are always decided // immediately, but transactional records are only decided once // they are commited or aborted. // // The LastStableOffset will always be at or under the HighWatermark. LastStableOffset int64 // v4+ // LogStartOffset is the beginning offset for this partition. // This field was added for KIP-107. LogStartOffset int64 // v5+ // In case divergence is detected based on the LastFetchedEpoch and // FetchOffset in the request, this field indicates the largest epoch and // its end offset such that subsequent records are known to diverge. DivergingEpoch FetchResponseTopicPartitionDivergingEpoch // tag 0 // CurrentLeader is the currently known leader ID and epoch for this // partition. CurrentLeader FetchResponseTopicPartitionCurrentLeader // tag 1 // In the case of fetching an offset less than the LogStartOffset, this // is the end offset and epoch that should be used in the FetchSnapshot // request. SnapshotID FetchResponseTopicPartitionSnapshotID // tag 2 // AbortedTransactions is an array of aborted transactions within the // returned offset range. This is only returned if the requested // isolation level was READ_COMMITTED. AbortedTransactions []FetchResponseTopicPartitionAbortedTransaction // v4+ // PreferredReadReplica is the preferred replica for the consumer // to use on its next fetch request. See KIP-392. PreferredReadReplica int32 // v11+ // RecordBatches is an array of record batches for a topic partition. // // This is encoded as a raw byte array, with the standard int32 size // prefix. One important catch to note is that the final element of the // array may be **partial**. This is an optimization in Kafka that // clients must deal with by discarding a partial trailing batch. // // Starting v2, this transitioned to the MessageSet v1 format (and this // would contain many MessageV1 structs). // // Starting v4, this transitioned to the RecordBatch format (thus this // contains many RecordBatch structs). RecordBatches []byte }
func NewFetchResponseTopicPartition ¶
func NewFetchResponseTopicPartition() FetchResponseTopicPartition
NewFetchResponseTopicPartition returns a default FetchResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*FetchResponseTopicPartition) Default ¶
func (v *FetchResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchResponseTopicPartition.
type FetchResponseTopicPartitionAbortedTransaction ¶
type FetchResponseTopicPartitionAbortedTransaction struct { // ProducerID is the producer ID that caused this aborted transaction. ProducerID int64 // FirstOffset is the offset where this aborted transaction began. FirstOffset int64 }
func NewFetchResponseTopicPartitionAbortedTransaction ¶
func NewFetchResponseTopicPartitionAbortedTransaction() FetchResponseTopicPartitionAbortedTransaction
NewFetchResponseTopicPartitionAbortedTransaction returns a default FetchResponseTopicPartitionAbortedTransaction This is a shortcut for creating a struct and calling Default yourself.
func (*FetchResponseTopicPartitionAbortedTransaction) Default ¶
func (v *FetchResponseTopicPartitionAbortedTransaction) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchResponseTopicPartitionAbortedTransaction.
type FetchResponseTopicPartitionCurrentLeader ¶
type FetchResponseTopicPartitionCurrentLeader struct { // The ID of the current leader, or -1 if unknown. LeaderID int32 // The latest known leader epoch. LeaderEpoch int32 }
func NewFetchResponseTopicPartitionCurrentLeader ¶
func NewFetchResponseTopicPartitionCurrentLeader() FetchResponseTopicPartitionCurrentLeader
NewFetchResponseTopicPartitionCurrentLeader returns a default FetchResponseTopicPartitionCurrentLeader This is a shortcut for creating a struct and calling Default yourself.
func (*FetchResponseTopicPartitionCurrentLeader) Default ¶
func (v *FetchResponseTopicPartitionCurrentLeader) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchResponseTopicPartitionCurrentLeader.
type FetchResponseTopicPartitionDivergingEpoch ¶
func NewFetchResponseTopicPartitionDivergingEpoch ¶
func NewFetchResponseTopicPartitionDivergingEpoch() FetchResponseTopicPartitionDivergingEpoch
NewFetchResponseTopicPartitionDivergingEpoch returns a default FetchResponseTopicPartitionDivergingEpoch This is a shortcut for creating a struct and calling Default yourself.
func (*FetchResponseTopicPartitionDivergingEpoch) Default ¶
func (v *FetchResponseTopicPartitionDivergingEpoch) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchResponseTopicPartitionDivergingEpoch.
type FetchResponseTopicPartitionSnapshotID ¶ added in v0.6.2
func NewFetchResponseTopicPartitionSnapshotID ¶ added in v0.6.2
func NewFetchResponseTopicPartitionSnapshotID() FetchResponseTopicPartitionSnapshotID
NewFetchResponseTopicPartitionSnapshotID returns a default FetchResponseTopicPartitionSnapshotID This is a shortcut for creating a struct and calling Default yourself.
func (*FetchResponseTopicPartitionSnapshotID) Default ¶ added in v0.6.2
func (v *FetchResponseTopicPartitionSnapshotID) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchResponseTopicPartitionSnapshotID.
type FetchSnapshotRequest ¶ added in v0.6.2
type FetchSnapshotRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The ClusterID if known, this is used to validate metadata fetches prior to // broker registration. ClusterID *string // tag 0 // The broker ID of the follower. ReplicaID int32 // The maximum bytes to fetch from all of the snapshots. MaxBytes int32 // The topics to fetch. Topics []FetchSnapshotRequestTopic }
Introduced for KIP-630, FetchSnapshotRequest is a part of the inter-Kafka raft protocol to remove the dependency on Zookeeper.
func NewFetchSnapshotRequest ¶ added in v0.6.2
func NewFetchSnapshotRequest() FetchSnapshotRequest
NewFetchSnapshotRequest returns a default FetchSnapshotRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrFetchSnapshotRequest ¶ added in v0.6.2
func NewPtrFetchSnapshotRequest() *FetchSnapshotRequest
NewPtrFetchSnapshotRequest returns a pointer to a default FetchSnapshotRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*FetchSnapshotRequest) AppendTo ¶ added in v0.6.2
func (v *FetchSnapshotRequest) AppendTo(dst []byte) []byte
func (*FetchSnapshotRequest) Default ¶ added in v0.6.2
func (v *FetchSnapshotRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotRequest.
func (*FetchSnapshotRequest) GetVersion ¶ added in v0.6.2
func (v *FetchSnapshotRequest) GetVersion() int16
func (*FetchSnapshotRequest) IsFlexible ¶ added in v0.6.2
func (v *FetchSnapshotRequest) IsFlexible() bool
func (*FetchSnapshotRequest) Key ¶ added in v0.6.2
func (*FetchSnapshotRequest) Key() int16
func (*FetchSnapshotRequest) MaxVersion ¶ added in v0.6.2
func (*FetchSnapshotRequest) MaxVersion() int16
func (*FetchSnapshotRequest) ReadFrom ¶ added in v0.6.2
func (v *FetchSnapshotRequest) ReadFrom(src []byte) error
func (*FetchSnapshotRequest) RequestWith ¶ added in v0.6.2
func (v *FetchSnapshotRequest) RequestWith(ctx context.Context, r Requestor) (*FetchSnapshotResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*FetchSnapshotRequest) ResponseKind ¶ added in v0.6.2
func (v *FetchSnapshotRequest) ResponseKind() Response
func (*FetchSnapshotRequest) SetVersion ¶ added in v0.6.2
func (v *FetchSnapshotRequest) SetVersion(version int16)
type FetchSnapshotRequestTopic ¶ added in v0.6.2
type FetchSnapshotRequestTopic struct { // The name of the topic to fetch. Topic string // The partitions to fetch. Partitions []FetchSnapshotRequestTopicPartition }
func NewFetchSnapshotRequestTopic ¶ added in v0.6.2
func NewFetchSnapshotRequestTopic() FetchSnapshotRequestTopic
NewFetchSnapshotRequestTopic returns a default FetchSnapshotRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*FetchSnapshotRequestTopic) Default ¶ added in v0.6.2
func (v *FetchSnapshotRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotRequestTopic.
type FetchSnapshotRequestTopicPartition ¶ added in v0.6.2
type FetchSnapshotRequestTopicPartition struct { // The partition to fetch. Partition int32 // The current leader epoch of the partition, or -1 for an unknown leader epoch. CurrentLeaderEpoch int32 // The snapshot end offset and epoch to fetch. SnapshotID FetchSnapshotRequestTopicPartitionSnapshotID // The byte position within the snapshot to start fetching from. Position int64 }
func NewFetchSnapshotRequestTopicPartition ¶ added in v0.6.2
func NewFetchSnapshotRequestTopicPartition() FetchSnapshotRequestTopicPartition
NewFetchSnapshotRequestTopicPartition returns a default FetchSnapshotRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*FetchSnapshotRequestTopicPartition) Default ¶ added in v0.6.2
func (v *FetchSnapshotRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotRequestTopicPartition.
type FetchSnapshotRequestTopicPartitionSnapshotID ¶ added in v0.6.2
func NewFetchSnapshotRequestTopicPartitionSnapshotID ¶ added in v0.6.2
func NewFetchSnapshotRequestTopicPartitionSnapshotID() FetchSnapshotRequestTopicPartitionSnapshotID
NewFetchSnapshotRequestTopicPartitionSnapshotID returns a default FetchSnapshotRequestTopicPartitionSnapshotID This is a shortcut for creating a struct and calling Default yourself.
func (*FetchSnapshotRequestTopicPartitionSnapshotID) Default ¶ added in v0.6.2
func (v *FetchSnapshotRequestTopicPartitionSnapshotID) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotRequestTopicPartitionSnapshotID.
type FetchSnapshotResponse ¶ added in v0.6.2
type FetchSnapshotResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // The top level response error code. ErrorCode int16 // The topics to fetch. Topics []FetchSnapshotResponseTopic }
FetchSnapshotResponse is a response for a FetchSnapshotRequest.
func NewFetchSnapshotResponse ¶ added in v0.6.2
func NewFetchSnapshotResponse() FetchSnapshotResponse
NewFetchSnapshotResponse returns a default FetchSnapshotResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrFetchSnapshotResponse ¶ added in v0.6.2
func NewPtrFetchSnapshotResponse() *FetchSnapshotResponse
NewPtrFetchSnapshotResponse returns a pointer to a default FetchSnapshotResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*FetchSnapshotResponse) AppendTo ¶ added in v0.6.2
func (v *FetchSnapshotResponse) AppendTo(dst []byte) []byte
func (*FetchSnapshotResponse) Default ¶ added in v0.6.2
func (v *FetchSnapshotResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotResponse.
func (*FetchSnapshotResponse) GetVersion ¶ added in v0.6.2
func (v *FetchSnapshotResponse) GetVersion() int16
func (*FetchSnapshotResponse) IsFlexible ¶ added in v0.6.2
func (v *FetchSnapshotResponse) IsFlexible() bool
func (*FetchSnapshotResponse) Key ¶ added in v0.6.2
func (*FetchSnapshotResponse) Key() int16
func (*FetchSnapshotResponse) MaxVersion ¶ added in v0.6.2
func (*FetchSnapshotResponse) MaxVersion() int16
func (*FetchSnapshotResponse) ReadFrom ¶ added in v0.6.2
func (v *FetchSnapshotResponse) ReadFrom(src []byte) error
func (*FetchSnapshotResponse) RequestKind ¶ added in v0.6.2
func (v *FetchSnapshotResponse) RequestKind() Request
func (*FetchSnapshotResponse) SetVersion ¶ added in v0.6.2
func (v *FetchSnapshotResponse) SetVersion(version int16)
func (*FetchSnapshotResponse) Throttle ¶ added in v0.6.2
func (v *FetchSnapshotResponse) Throttle() (int32, bool)
type FetchSnapshotResponseTopic ¶ added in v0.6.2
type FetchSnapshotResponseTopic struct { // The name of the topic to fetch. Topic string // The partitions to fetch. Partitions []FetchSnapshotResponseTopicPartition }
func NewFetchSnapshotResponseTopic ¶ added in v0.6.2
func NewFetchSnapshotResponseTopic() FetchSnapshotResponseTopic
NewFetchSnapshotResponseTopic returns a default FetchSnapshotResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*FetchSnapshotResponseTopic) Default ¶ added in v0.6.2
func (v *FetchSnapshotResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotResponseTopic.
type FetchSnapshotResponseTopicPartition ¶ added in v0.6.2
type FetchSnapshotResponseTopicPartition struct { // The partition. Partition int32 // An error code, or 0 if there was no fetch error. ErrorCode int16 // The snapshot end offset and epoch to fetch. SnapshotID FetchSnapshotResponseTopicPartitionSnapshotID // The ID of the current leader (or -1 if unknown) and the latest known // leader epoch. CurrentLeader FetchSnapshotResponseTopicPartitionCurrentLeader // tag 0 // The total size of the snapshot. Size int64 // The starting byte position within the snapshot included in the Bytes // field. Position int64 // Snapshot data. Bytes []byte }
func NewFetchSnapshotResponseTopicPartition ¶ added in v0.6.2
func NewFetchSnapshotResponseTopicPartition() FetchSnapshotResponseTopicPartition
NewFetchSnapshotResponseTopicPartition returns a default FetchSnapshotResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*FetchSnapshotResponseTopicPartition) Default ¶ added in v0.6.2
func (v *FetchSnapshotResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotResponseTopicPartition.
type FetchSnapshotResponseTopicPartitionCurrentLeader ¶ added in v0.6.2
func NewFetchSnapshotResponseTopicPartitionCurrentLeader ¶ added in v0.6.2
func NewFetchSnapshotResponseTopicPartitionCurrentLeader() FetchSnapshotResponseTopicPartitionCurrentLeader
NewFetchSnapshotResponseTopicPartitionCurrentLeader returns a default FetchSnapshotResponseTopicPartitionCurrentLeader This is a shortcut for creating a struct and calling Default yourself.
func (*FetchSnapshotResponseTopicPartitionCurrentLeader) Default ¶ added in v0.6.2
func (v *FetchSnapshotResponseTopicPartitionCurrentLeader) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotResponseTopicPartitionCurrentLeader.
type FetchSnapshotResponseTopicPartitionSnapshotID ¶ added in v0.6.2
func NewFetchSnapshotResponseTopicPartitionSnapshotID ¶ added in v0.6.2
func NewFetchSnapshotResponseTopicPartitionSnapshotID() FetchSnapshotResponseTopicPartitionSnapshotID
NewFetchSnapshotResponseTopicPartitionSnapshotID returns a default FetchSnapshotResponseTopicPartitionSnapshotID This is a shortcut for creating a struct and calling Default yourself.
func (*FetchSnapshotResponseTopicPartitionSnapshotID) Default ¶ added in v0.6.2
func (v *FetchSnapshotResponseTopicPartitionSnapshotID) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FetchSnapshotResponseTopicPartitionSnapshotID.
type FindCoordinatorRequest ¶
type FindCoordinatorRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // CoordinatorKey is the ID to use for finding the coordinator. For groups, // this is the group name, for transactional producer, this is the // transactional ID. CoordinatorKey string // CoordinatorType is the type that key is. Groups are type 0, // transactional IDs are type 1. CoordinatorType int8 // v1+ }
FindCoordinatorRequest requests the coordinator for a group or transaction.
This coordinator is different from the broker leader coordinator. This coordinator is the partition leader for the partition that is storing the group or transaction ID.
func NewFindCoordinatorRequest ¶
func NewFindCoordinatorRequest() FindCoordinatorRequest
NewFindCoordinatorRequest returns a default FindCoordinatorRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrFindCoordinatorRequest ¶
func NewPtrFindCoordinatorRequest() *FindCoordinatorRequest
NewPtrFindCoordinatorRequest returns a pointer to a default FindCoordinatorRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*FindCoordinatorRequest) AppendTo ¶
func (v *FindCoordinatorRequest) AppendTo(dst []byte) []byte
func (*FindCoordinatorRequest) Default ¶
func (v *FindCoordinatorRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FindCoordinatorRequest.
func (*FindCoordinatorRequest) GetVersion ¶
func (v *FindCoordinatorRequest) GetVersion() int16
func (*FindCoordinatorRequest) IsFlexible ¶
func (v *FindCoordinatorRequest) IsFlexible() bool
func (*FindCoordinatorRequest) Key ¶
func (*FindCoordinatorRequest) Key() int16
func (*FindCoordinatorRequest) MaxVersion ¶
func (*FindCoordinatorRequest) MaxVersion() int16
func (*FindCoordinatorRequest) ReadFrom ¶
func (v *FindCoordinatorRequest) ReadFrom(src []byte) error
func (*FindCoordinatorRequest) RequestWith ¶
func (v *FindCoordinatorRequest) RequestWith(ctx context.Context, r Requestor) (*FindCoordinatorResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*FindCoordinatorRequest) ResponseKind ¶
func (v *FindCoordinatorRequest) ResponseKind() Response
func (*FindCoordinatorRequest) SetVersion ¶
func (v *FindCoordinatorRequest) SetVersion(version int16)
type FindCoordinatorResponse ¶
type FindCoordinatorResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // v1+ // ErrorCode is the error returned for the request. // // GROUP_AUTHORIZATION_FAILED is returned if for a group ID request and the // client is not authorized to describe groups. // // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned for a transactional ID // request and the client is not authorized to describe transactional IDs. // // INVALID_REQUEST is returned if not asking for a known type (group, // or transaction). // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available // for the requested ID, which would be if the group or transactional topic // does not exist or the partition the requested key maps to is not available. ErrorCode int16 // ErrorMessage is an informative message if the request errored. ErrorMessage *string // v1+ // NodeID is the broker ID of the coordinator. NodeID int32 // Host is the host of the coordinator. Host string // Port is the port of the coordinator. Port int32 }
FindCoordinatorResponse is returned from a FindCoordinatorRequest.
func NewFindCoordinatorResponse ¶
func NewFindCoordinatorResponse() FindCoordinatorResponse
NewFindCoordinatorResponse returns a default FindCoordinatorResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrFindCoordinatorResponse ¶
func NewPtrFindCoordinatorResponse() *FindCoordinatorResponse
NewPtrFindCoordinatorResponse returns a pointer to a default FindCoordinatorResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*FindCoordinatorResponse) AppendTo ¶
func (v *FindCoordinatorResponse) AppendTo(dst []byte) []byte
func (*FindCoordinatorResponse) Default ¶
func (v *FindCoordinatorResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to FindCoordinatorResponse.
func (*FindCoordinatorResponse) GetVersion ¶
func (v *FindCoordinatorResponse) GetVersion() int16
func (*FindCoordinatorResponse) IsFlexible ¶
func (v *FindCoordinatorResponse) IsFlexible() bool
func (*FindCoordinatorResponse) Key ¶
func (*FindCoordinatorResponse) Key() int16
func (*FindCoordinatorResponse) MaxVersion ¶
func (*FindCoordinatorResponse) MaxVersion() int16
func (*FindCoordinatorResponse) ReadFrom ¶
func (v *FindCoordinatorResponse) ReadFrom(src []byte) error
func (*FindCoordinatorResponse) RequestKind ¶
func (v *FindCoordinatorResponse) RequestKind() Request
func (*FindCoordinatorResponse) SetVersion ¶
func (v *FindCoordinatorResponse) SetVersion(version int16)
func (*FindCoordinatorResponse) Throttle ¶ added in v0.6.2
func (v *FindCoordinatorResponse) Throttle() (int32, bool)
type GroupCoordinatorRequest ¶
type GroupCoordinatorRequest interface { // IsGroupCoordinatorRequest is a method attached to requests that // must be issued to group coordinators. IsGroupCoordinatorRequest() Request }
GroupCoordinatorRequest represents a request that must be issued to a group coordinator.
type GroupMemberAssignment ¶
type GroupMemberAssignment struct { // Verson is currently version 0. Version int16 // Topics contains topics in the assignment. Topics []GroupMemberAssignmentTopic // UserData is arbitrary client data for a given client in the group. UserData []byte }
GroupMemberAssignment is the assignment data that is usually sent with a sync group request with the "consumer" protocol.
func NewGroupMemberAssignment ¶
func NewGroupMemberAssignment() GroupMemberAssignment
NewGroupMemberAssignment returns a default GroupMemberAssignment This is a shortcut for creating a struct and calling Default yourself.
func (*GroupMemberAssignment) AppendTo ¶
func (v *GroupMemberAssignment) AppendTo(dst []byte) []byte
func (*GroupMemberAssignment) Default ¶
func (v *GroupMemberAssignment) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to GroupMemberAssignment.
func (*GroupMemberAssignment) ReadFrom ¶
func (v *GroupMemberAssignment) ReadFrom(src []byte) error
type GroupMemberAssignmentTopic ¶
type GroupMemberAssignmentTopic struct { // Topic is a topic in the assignment. Topic string // Partitions contains partitions in the assignment. Partitions []int32 }
func NewGroupMemberAssignmentTopic ¶
func NewGroupMemberAssignmentTopic() GroupMemberAssignmentTopic
NewGroupMemberAssignmentTopic returns a default GroupMemberAssignmentTopic This is a shortcut for creating a struct and calling Default yourself.
func (*GroupMemberAssignmentTopic) Default ¶
func (v *GroupMemberAssignmentTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to GroupMemberAssignmentTopic.
type GroupMemberMetadata ¶
type GroupMemberMetadata struct { // Version is either version 0 or version 1. Version int16 // Topics is the list of topics in the group that this member is interested // in consuming. Topics []string // UserData is arbitrary client data for a given client in the group. // For sticky assignment, this is StickyMemberMetadata. UserData []byte // OwnedPartitions, introduced for KIP-429, are the partitions that this // member currently owns. OwnedPartitions []GroupMemberMetadataOwnedPartition // v1+ }
GroupMemberMetadata is the metadata that is usually sent with a join group request with the "consumer" protocol.
func NewGroupMemberMetadata ¶
func NewGroupMemberMetadata() GroupMemberMetadata
NewGroupMemberMetadata returns a default GroupMemberMetadata This is a shortcut for creating a struct and calling Default yourself.
func (*GroupMemberMetadata) AppendTo ¶
func (v *GroupMemberMetadata) AppendTo(dst []byte) []byte
func (*GroupMemberMetadata) Default ¶
func (v *GroupMemberMetadata) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to GroupMemberMetadata.
func (*GroupMemberMetadata) ReadFrom ¶
func (v *GroupMemberMetadata) ReadFrom(src []byte) error
type GroupMemberMetadataOwnedPartition ¶
func NewGroupMemberMetadataOwnedPartition ¶
func NewGroupMemberMetadataOwnedPartition() GroupMemberMetadataOwnedPartition
NewGroupMemberMetadataOwnedPartition returns a default GroupMemberMetadataOwnedPartition This is a shortcut for creating a struct and calling Default yourself.
func (*GroupMemberMetadataOwnedPartition) Default ¶
func (v *GroupMemberMetadataOwnedPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to GroupMemberMetadataOwnedPartition.
type GroupMetadataKey ¶
type GroupMetadataKey struct { // Version is which encoding version this value is using. Version int16 // Group is the group this metadata is for. Group string }
GroupMetadataKey is the key for the Kafka internal __consumer_offsets topic if the key starts with an int16 with a value of 2.
This type was introduced in KAFKA-2017 commit 7c33475274 with release 0.9.0 and has been in use ever since.
func NewGroupMetadataKey ¶
func NewGroupMetadataKey() GroupMetadataKey
NewGroupMetadataKey returns a default GroupMetadataKey This is a shortcut for creating a struct and calling Default yourself.
func (*GroupMetadataKey) AppendTo ¶
func (v *GroupMetadataKey) AppendTo(dst []byte) []byte
func (*GroupMetadataKey) Default ¶
func (v *GroupMetadataKey) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to GroupMetadataKey.
func (*GroupMetadataKey) ReadFrom ¶
func (v *GroupMetadataKey) ReadFrom(src []byte) error
type GroupMetadataValue ¶
type GroupMetadataValue struct { // Version is the version of this value. Version int16 // ProtocolType is the type of protocol being used for the group // (i.e., "consumer"). ProtocolType string // Generation is the generation of this group. Generation int32 // Protocol is the agreed upon protocol all members are using to partition // (i.e., "sticky"). Protocol *string // Leader is the group leader. Leader *string // CurrentStateTimestamp is the timestamp for this state of the group // (stable, etc.). CurrentStateTimestamp int64 // v2+ // Members are the group members. Members []GroupMetadataValueMember }
GroupMetadataValue is the value for the Kafka internal __consumer_offsets topic if the key is of GroupMetadataKey type.
Version 0 was introduced with the key version 0.
KAFKA-3888 commit 40b1dd3f49, proposed in KIP-62 and included in 0.10.1 released version 1.
KAFKA-4682 commit 418a91b5d4, proposed in KIP-211 and included in 2.1.0 released version 2.
KAFKA-7862 commit 0f995ba6be, proposed in KIP-345 and included in 2.3.0 released version 3.
func NewGroupMetadataValue ¶
func NewGroupMetadataValue() GroupMetadataValue
NewGroupMetadataValue returns a default GroupMetadataValue This is a shortcut for creating a struct and calling Default yourself.
func (*GroupMetadataValue) AppendTo ¶
func (v *GroupMetadataValue) AppendTo(dst []byte) []byte
func (*GroupMetadataValue) Default ¶
func (v *GroupMetadataValue) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to GroupMetadataValue.
func (*GroupMetadataValue) ReadFrom ¶
func (v *GroupMetadataValue) ReadFrom(src []byte) error
type GroupMetadataValueMember ¶
type GroupMetadataValueMember struct { // MemberID is a group member. MemberID string // InstanceID is the instance ID of this member in the group (KIP-345). InstanceID *string // v3+ // ClientID is the client ID of this group member. ClientID string // ClientHost is the hostname of this group member. ClientHost string // RebalanceTimeoutMillis is the rebalance timeout of this group member. RebalanceTimeoutMillis int32 // v1+ // SessionTimeoutMillis is the session timeout of this group member. SessionTimeoutMillis int32 // Subscription is the subscription of this group member. Subscription []byte // Assignment is what the leader assigned this group member. Assignment []byte }
func NewGroupMetadataValueMember ¶
func NewGroupMetadataValueMember() GroupMetadataValueMember
NewGroupMetadataValueMember returns a default GroupMetadataValueMember This is a shortcut for creating a struct and calling Default yourself.
func (*GroupMetadataValueMember) Default ¶
func (v *GroupMetadataValueMember) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to GroupMetadataValueMember.
type Header ¶
Header is user provided metadata for a record. Kafka does not look at headers at all; they are solely for producers and consumers.
func NewHeader ¶
func NewHeader() Header
NewHeader returns a default Header This is a shortcut for creating a struct and calling Default yourself.
type HeartbeatRequest ¶
type HeartbeatRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Group is the group ID this heartbeat is for. Group string // Generation is the group generation this heartbeat is for. Generation int32 // MemberID is the member ID this member is for. MemberID string // InstanceID is the instance ID of this member in the group (KIP-345). InstanceID *string // v3+ }
HeartbeatRequest issues a heartbeat for a member in a group, ensuring that Kafka does not expire the member from the group.
func NewHeartbeatRequest ¶
func NewHeartbeatRequest() HeartbeatRequest
NewHeartbeatRequest returns a default HeartbeatRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrHeartbeatRequest ¶
func NewPtrHeartbeatRequest() *HeartbeatRequest
NewPtrHeartbeatRequest returns a pointer to a default HeartbeatRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*HeartbeatRequest) AppendTo ¶
func (v *HeartbeatRequest) AppendTo(dst []byte) []byte
func (*HeartbeatRequest) Default ¶
func (v *HeartbeatRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to HeartbeatRequest.
func (*HeartbeatRequest) GetVersion ¶
func (v *HeartbeatRequest) GetVersion() int16
func (*HeartbeatRequest) IsFlexible ¶
func (v *HeartbeatRequest) IsFlexible() bool
func (*HeartbeatRequest) IsGroupCoordinatorRequest ¶
func (v *HeartbeatRequest) IsGroupCoordinatorRequest()
func (*HeartbeatRequest) Key ¶
func (*HeartbeatRequest) Key() int16
func (*HeartbeatRequest) MaxVersion ¶
func (*HeartbeatRequest) MaxVersion() int16
func (*HeartbeatRequest) ReadFrom ¶
func (v *HeartbeatRequest) ReadFrom(src []byte) error
func (*HeartbeatRequest) RequestWith ¶
func (v *HeartbeatRequest) RequestWith(ctx context.Context, r Requestor) (*HeartbeatResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*HeartbeatRequest) ResponseKind ¶
func (v *HeartbeatRequest) ResponseKind() Response
func (*HeartbeatRequest) SetVersion ¶
func (v *HeartbeatRequest) SetVersion(version int16)
type HeartbeatResponse ¶
type HeartbeatResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // v1+ // ErrorCode is the error for the heartbeat request. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to the group (no read perms). // // INVALID_GROUP_ID is returned in the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available // (due to the requested broker shutting down or it has not completed startup). // // NOT_COORDINATOR is returned if the requested broker is not the coordinator // for the requested group. // // UNKNOWN_MEMBER_ID is returned if the member ID is not a part of the group, // or if the group is empty or dead. // // ILLEGAL_GENERATION is returned if the request's generation ID is invalid. // // REBALANCE_IN_PROGRESS is returned if the group is currently rebalancing. ErrorCode int16 }
HeartbeatResponse is returned from a HeartbeatRequest.
func NewHeartbeatResponse ¶
func NewHeartbeatResponse() HeartbeatResponse
NewHeartbeatResponse returns a default HeartbeatResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrHeartbeatResponse ¶
func NewPtrHeartbeatResponse() *HeartbeatResponse
NewPtrHeartbeatResponse returns a pointer to a default HeartbeatResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*HeartbeatResponse) AppendTo ¶
func (v *HeartbeatResponse) AppendTo(dst []byte) []byte
func (*HeartbeatResponse) Default ¶
func (v *HeartbeatResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to HeartbeatResponse.
func (*HeartbeatResponse) GetVersion ¶
func (v *HeartbeatResponse) GetVersion() int16
func (*HeartbeatResponse) IsFlexible ¶
func (v *HeartbeatResponse) IsFlexible() bool
func (*HeartbeatResponse) Key ¶
func (*HeartbeatResponse) Key() int16
func (*HeartbeatResponse) MaxVersion ¶
func (*HeartbeatResponse) MaxVersion() int16
func (*HeartbeatResponse) ReadFrom ¶
func (v *HeartbeatResponse) ReadFrom(src []byte) error
func (*HeartbeatResponse) RequestKind ¶
func (v *HeartbeatResponse) RequestKind() Request
func (*HeartbeatResponse) SetVersion ¶
func (v *HeartbeatResponse) SetVersion(version int16)
func (*HeartbeatResponse) Throttle ¶ added in v0.6.2
func (v *HeartbeatResponse) Throttle() (int32, bool)
type IncrementalAlterConfigsRequest ¶
type IncrementalAlterConfigsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Resources is an array of configs to alter. Resources []IncrementalAlterConfigsRequestResource // ValidateOnly validates the request but does not apply it. ValidateOnly bool }
IncrementalAlterConfigsRequest issues ar equest to alter either topic or broker configs.
This API was added in Kafka 2.3.0 to replace AlterConfigs. The key benefit of this API is that consumers do not need to know the full config state to add or remove new config options. See KIP-339 for more details.
func NewIncrementalAlterConfigsRequest ¶
func NewIncrementalAlterConfigsRequest() IncrementalAlterConfigsRequest
NewIncrementalAlterConfigsRequest returns a default IncrementalAlterConfigsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrIncrementalAlterConfigsRequest ¶
func NewPtrIncrementalAlterConfigsRequest() *IncrementalAlterConfigsRequest
NewPtrIncrementalAlterConfigsRequest returns a pointer to a default IncrementalAlterConfigsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*IncrementalAlterConfigsRequest) AppendTo ¶
func (v *IncrementalAlterConfigsRequest) AppendTo(dst []byte) []byte
func (*IncrementalAlterConfigsRequest) Default ¶
func (v *IncrementalAlterConfigsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to IncrementalAlterConfigsRequest.
func (*IncrementalAlterConfigsRequest) GetVersion ¶
func (v *IncrementalAlterConfigsRequest) GetVersion() int16
func (*IncrementalAlterConfigsRequest) IsFlexible ¶
func (v *IncrementalAlterConfigsRequest) IsFlexible() bool
func (*IncrementalAlterConfigsRequest) Key ¶
func (*IncrementalAlterConfigsRequest) Key() int16
func (*IncrementalAlterConfigsRequest) MaxVersion ¶
func (*IncrementalAlterConfigsRequest) MaxVersion() int16
func (*IncrementalAlterConfigsRequest) ReadFrom ¶
func (v *IncrementalAlterConfigsRequest) ReadFrom(src []byte) error
func (*IncrementalAlterConfigsRequest) RequestWith ¶
func (v *IncrementalAlterConfigsRequest) RequestWith(ctx context.Context, r Requestor) (*IncrementalAlterConfigsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*IncrementalAlterConfigsRequest) ResponseKind ¶
func (v *IncrementalAlterConfigsRequest) ResponseKind() Response
func (*IncrementalAlterConfigsRequest) SetVersion ¶
func (v *IncrementalAlterConfigsRequest) SetVersion(version int16)
type IncrementalAlterConfigsRequestResource ¶
type IncrementalAlterConfigsRequestResource struct { // ResourceType is an enum corresponding to the type of config to alter. ResourceType ConfigResourceType // ResourceName is the name of config to alter. // // If the requested type is a topic, this corresponds to a topic name. // // If the requested type if a broker, this should either be empty or be // the ID of the broker this request is issued to. If it is empty, this // updates all broker configs. If a specific ID, this updates just the // broker. Using a specific ID also ensures that brokers reload config // or secret files even if the file path has not changed. Lastly, password // config options can only be defined on a per broker basis. // // If the type is broker logger, this must be a broker ID. ResourceName string // Configs contains key/value config pairs to set on the resource. Configs []IncrementalAlterConfigsRequestResourceConfig }
func NewIncrementalAlterConfigsRequestResource ¶
func NewIncrementalAlterConfigsRequestResource() IncrementalAlterConfigsRequestResource
NewIncrementalAlterConfigsRequestResource returns a default IncrementalAlterConfigsRequestResource This is a shortcut for creating a struct and calling Default yourself.
func (*IncrementalAlterConfigsRequestResource) Default ¶
func (v *IncrementalAlterConfigsRequestResource) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to IncrementalAlterConfigsRequestResource.
type IncrementalAlterConfigsRequestResourceConfig ¶
type IncrementalAlterConfigsRequestResourceConfig struct { // Name is a key to modify (e.g. segment.bytes). // // For broker loggers, see KIP-412 section "Request/Response Overview" // for details on how to change per logger log levels. Name string // Op is the type of operation to perform for this config name. // // SET (0) is to set a configuration value; the value must not be null. // // DELETE (1) is to delete a configuration key. // // APPEND (2) is to add a value to the list of values for a key (if the // key is for a list of values). // // SUBTRACT (3) is to remove a value from a list of values (if the key // is for a list of values). Op int8 // Value is a value to set for the key (e.g. 10). Value *string }
func NewIncrementalAlterConfigsRequestResourceConfig ¶
func NewIncrementalAlterConfigsRequestResourceConfig() IncrementalAlterConfigsRequestResourceConfig
NewIncrementalAlterConfigsRequestResourceConfig returns a default IncrementalAlterConfigsRequestResourceConfig This is a shortcut for creating a struct and calling Default yourself.
func (*IncrementalAlterConfigsRequestResourceConfig) Default ¶
func (v *IncrementalAlterConfigsRequestResourceConfig) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to IncrementalAlterConfigsRequestResourceConfig.
type IncrementalAlterConfigsResponse ¶
type IncrementalAlterConfigsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // Resources are responses for each resources in the alter request. Resources []IncrementalAlterConfigsResponseResource }
IncrementalAlterConfigsResponse is returned from an IncrementalAlterConfigsRequest.
func NewIncrementalAlterConfigsResponse ¶
func NewIncrementalAlterConfigsResponse() IncrementalAlterConfigsResponse
NewIncrementalAlterConfigsResponse returns a default IncrementalAlterConfigsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrIncrementalAlterConfigsResponse ¶
func NewPtrIncrementalAlterConfigsResponse() *IncrementalAlterConfigsResponse
NewPtrIncrementalAlterConfigsResponse returns a pointer to a default IncrementalAlterConfigsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*IncrementalAlterConfigsResponse) AppendTo ¶
func (v *IncrementalAlterConfigsResponse) AppendTo(dst []byte) []byte
func (*IncrementalAlterConfigsResponse) Default ¶
func (v *IncrementalAlterConfigsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to IncrementalAlterConfigsResponse.
func (*IncrementalAlterConfigsResponse) GetVersion ¶
func (v *IncrementalAlterConfigsResponse) GetVersion() int16
func (*IncrementalAlterConfigsResponse) IsFlexible ¶
func (v *IncrementalAlterConfigsResponse) IsFlexible() bool
func (*IncrementalAlterConfigsResponse) Key ¶
func (*IncrementalAlterConfigsResponse) Key() int16
func (*IncrementalAlterConfigsResponse) MaxVersion ¶
func (*IncrementalAlterConfigsResponse) MaxVersion() int16
func (*IncrementalAlterConfigsResponse) ReadFrom ¶
func (v *IncrementalAlterConfigsResponse) ReadFrom(src []byte) error
func (*IncrementalAlterConfigsResponse) RequestKind ¶
func (v *IncrementalAlterConfigsResponse) RequestKind() Request
func (*IncrementalAlterConfigsResponse) SetVersion ¶
func (v *IncrementalAlterConfigsResponse) SetVersion(version int16)
func (*IncrementalAlterConfigsResponse) Throttle ¶ added in v0.6.2
func (v *IncrementalAlterConfigsResponse) Throttle() (int32, bool)
type IncrementalAlterConfigsResponseResource ¶
type IncrementalAlterConfigsResponseResource struct { // ErrorCode is the error code returned for incrementally altering configs. // // CLUSTER_AUTHORIZATION_FAILED is returned if asking to alter broker // configs but the client is not authorized to do so. // // TOPIC_AUTHORIZATION_FAILED is returned if asking to alter topic // configs but the client is not authorized to do so. // // INVALID_TOPIC_EXCEPTION is returned if the requested topic was invalid. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of // the requested topic. // // INVALID_REQUEST is returned if the requested config is invalid or if // asking Kafka to alter an invalid resource. ErrorCode int16 // ErrorMessage is an informative message if the incremental alter config failed. ErrorMessage *string // ResourceType is the enum corresponding to the type of altered config. ResourceType ConfigResourceType // ResourceName is the name corresponding to the incremental alter config // request. ResourceName string }
func NewIncrementalAlterConfigsResponseResource ¶
func NewIncrementalAlterConfigsResponseResource() IncrementalAlterConfigsResponseResource
NewIncrementalAlterConfigsResponseResource returns a default IncrementalAlterConfigsResponseResource This is a shortcut for creating a struct and calling Default yourself.
func (*IncrementalAlterConfigsResponseResource) Default ¶
func (v *IncrementalAlterConfigsResponseResource) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to IncrementalAlterConfigsResponseResource.
type InitProducerIDRequest ¶
type InitProducerIDRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TransactionalID is the ID to use for transactions if using transactions. TransactionalID *string // TransactionTimeoutMillis is how long a transaction is allowed before // EndTxn is required. // // Note that this timeout only begins on the first AddPartitionsToTxn // request. TransactionTimeoutMillis int32 // ProducerID, added for KIP-360, is the current producer ID. This allows // the client to potentially recover on UNKNOWN_PRODUCER_ID errors. ProducerID int64 // v3+ // The producer's current epoch. This will be checked against the producer // epoch on the broker, and the request will return an error if they do not // match. Also added for KIP-360. ProducerEpoch int16 // v3+ }
InitProducerIDRequest initializes a producer ID for idempotent transactions, and if using transactions, a producer epoch. This is the first request necessary to begin idempotent producing or transactions.
Note that you do not need to go to a txn coordinator if you are initializing a producer id without a transactional id.
func NewInitProducerIDRequest ¶
func NewInitProducerIDRequest() InitProducerIDRequest
NewInitProducerIDRequest returns a default InitProducerIDRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrInitProducerIDRequest ¶
func NewPtrInitProducerIDRequest() *InitProducerIDRequest
NewPtrInitProducerIDRequest returns a pointer to a default InitProducerIDRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*InitProducerIDRequest) AppendTo ¶
func (v *InitProducerIDRequest) AppendTo(dst []byte) []byte
func (*InitProducerIDRequest) Default ¶
func (v *InitProducerIDRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to InitProducerIDRequest.
func (*InitProducerIDRequest) GetVersion ¶
func (v *InitProducerIDRequest) GetVersion() int16
func (*InitProducerIDRequest) IsFlexible ¶
func (v *InitProducerIDRequest) IsFlexible() bool
func (*InitProducerIDRequest) IsTxnCoordinatorRequest ¶
func (v *InitProducerIDRequest) IsTxnCoordinatorRequest()
func (*InitProducerIDRequest) Key ¶
func (*InitProducerIDRequest) Key() int16
func (*InitProducerIDRequest) MaxVersion ¶
func (*InitProducerIDRequest) MaxVersion() int16
func (*InitProducerIDRequest) ReadFrom ¶
func (v *InitProducerIDRequest) ReadFrom(src []byte) error
func (*InitProducerIDRequest) RequestWith ¶
func (v *InitProducerIDRequest) RequestWith(ctx context.Context, r Requestor) (*InitProducerIDResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*InitProducerIDRequest) ResponseKind ¶
func (v *InitProducerIDRequest) ResponseKind() Response
func (*InitProducerIDRequest) SetVersion ¶
func (v *InitProducerIDRequest) SetVersion(version int16)
type InitProducerIDResponse ¶
type InitProducerIDResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // CLUSTER_AUTHORIZATION_FAILED is returned when not using transactions if // the client is not authorized for idempotent_write on cluster. // // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned when using transactions // if the client is not authorized to write on transactional_id. // // INVALID_REQUEST is returned if using transactions and the transactional id // is an empty, non-null string // // COORDINATOR_LOAD_IN_PROGRESS is returned if the coordinator for this // transactional ID is still loading. // // NOT_COORDINATOR is returned if the broker is not the coordinator for // this transactional ID. // // INVALID_TRANSACTION_TIMEOUT is returned if using transactions and the timeout // is equal to over over transaction.max.timeout.ms or under 0. // // CONCURRENT_TRANSACTIONS is returned if there is an ongoing transaction // that is completing at the time this init is called. ErrorCode int16 // ProducerID is the next producer ID that Kafka generated. This ID is used // to ensure repeated produce requests do not result in duplicate records. ProducerID int64 // ProducerEpoch is the producer epoch to use for transactions. ProducerEpoch int16 }
InitProducerIDResponse is returned for an InitProducerIDRequest.
func NewInitProducerIDResponse ¶
func NewInitProducerIDResponse() InitProducerIDResponse
NewInitProducerIDResponse returns a default InitProducerIDResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrInitProducerIDResponse ¶
func NewPtrInitProducerIDResponse() *InitProducerIDResponse
NewPtrInitProducerIDResponse returns a pointer to a default InitProducerIDResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*InitProducerIDResponse) AppendTo ¶
func (v *InitProducerIDResponse) AppendTo(dst []byte) []byte
func (*InitProducerIDResponse) Default ¶
func (v *InitProducerIDResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to InitProducerIDResponse.
func (*InitProducerIDResponse) GetVersion ¶
func (v *InitProducerIDResponse) GetVersion() int16
func (*InitProducerIDResponse) IsFlexible ¶
func (v *InitProducerIDResponse) IsFlexible() bool
func (*InitProducerIDResponse) Key ¶
func (*InitProducerIDResponse) Key() int16
func (*InitProducerIDResponse) MaxVersion ¶
func (*InitProducerIDResponse) MaxVersion() int16
func (*InitProducerIDResponse) ReadFrom ¶
func (v *InitProducerIDResponse) ReadFrom(src []byte) error
func (*InitProducerIDResponse) RequestKind ¶
func (v *InitProducerIDResponse) RequestKind() Request
func (*InitProducerIDResponse) SetVersion ¶
func (v *InitProducerIDResponse) SetVersion(version int16)
func (*InitProducerIDResponse) Throttle ¶ added in v0.6.2
func (v *InitProducerIDResponse) Throttle() (int32, bool)
type JoinGroupRequest ¶
type JoinGroupRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Group is the group to join. Group string // SessionTimeoutMillis is how long a member in the group can go between // heartbeats. If a member does not send a heartbeat within this timeout, // the broker will remove the member from the group and initiate a rebalance. SessionTimeoutMillis int32 // RebalanceTimeoutMillis is how long the broker waits for members to join a group // once a rebalance begins. Kafka waits for the longest rebalance of all // members in the group. Member sessions are still alive; heartbeats will be // replied to with REBALANCE_IN_PROGRESS. Those members must transition to // joining within this rebalance timeout. Members that do not rejoin within // this timeout will be removed from the group. Members must commit offsets // within this timeout. // // The first join for a new group has a 3 second grace period for other // members to join; this grace period is extended until the RebalanceTimeoutMillis // is up or until 3 seconds lapse with no new members. RebalanceTimeoutMillis int32 // v1+ // MemberID is the member ID to join the group with. When joining a group for // the first time, use the empty string. The response will contain the member // ID that should be used going forward. MemberID string // InstanceID is a user configured ID that is used for making a group // member "static", allowing many rebalances to be avoided. InstanceID *string // v5+ // ProtocolType is the "type" of protocol being used for the join group. // The initial group creation sets the type; all additional members must // have the same type or they will be rejected. // // This is completely arbitrary, but the Java client and everything else // uses "consumer" as the protocol type. ProtocolType string // Protocols contains arbitrary information that group members use // for rebalancing. All group members must agree on at least one protocol // name. Protocols []JoinGroupRequestProtocol }
JoinGroupRequest issues a request to join a Kafka group. This will create a group if one does not exist. If joining an existing group, this may trigger a group rebalance.
This will trigger a group rebalance if the request is from the group leader, or if the request is from a group member with different metadata, or if the request is with a new group member.
Version 4 introduced replying to joins of existing groups with MEMBER_ID_REQUIRED, which requires re-issuing the join group with the returned member ID. See KIP-394 for more details.
Version 5 introduced InstanceID, allowing for more "static" membership. See KIP-345 for more details.
func NewJoinGroupRequest ¶
func NewJoinGroupRequest() JoinGroupRequest
NewJoinGroupRequest returns a default JoinGroupRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrJoinGroupRequest ¶
func NewPtrJoinGroupRequest() *JoinGroupRequest
NewPtrJoinGroupRequest returns a pointer to a default JoinGroupRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*JoinGroupRequest) AppendTo ¶
func (v *JoinGroupRequest) AppendTo(dst []byte) []byte
func (*JoinGroupRequest) Default ¶
func (v *JoinGroupRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to JoinGroupRequest.
func (*JoinGroupRequest) GetVersion ¶
func (v *JoinGroupRequest) GetVersion() int16
func (*JoinGroupRequest) IsFlexible ¶
func (v *JoinGroupRequest) IsFlexible() bool
func (*JoinGroupRequest) IsGroupCoordinatorRequest ¶
func (v *JoinGroupRequest) IsGroupCoordinatorRequest()
func (*JoinGroupRequest) Key ¶
func (*JoinGroupRequest) Key() int16
func (*JoinGroupRequest) MaxVersion ¶
func (*JoinGroupRequest) MaxVersion() int16
func (*JoinGroupRequest) ReadFrom ¶
func (v *JoinGroupRequest) ReadFrom(src []byte) error
func (*JoinGroupRequest) RequestWith ¶
func (v *JoinGroupRequest) RequestWith(ctx context.Context, r Requestor) (*JoinGroupResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*JoinGroupRequest) ResponseKind ¶
func (v *JoinGroupRequest) ResponseKind() Response
func (*JoinGroupRequest) SetVersion ¶
func (v *JoinGroupRequest) SetVersion(version int16)
type JoinGroupRequestProtocol ¶
type JoinGroupRequestProtocol struct { // Name is a name of a protocol. This is arbitrary, but is used // in the official client to agree on a partition balancing strategy. // // The official client uses range, roundrobin, or sticky (which was // introduced in KIP-54). Name string // Metadata is arbitrary information to pass along with this // protocol name for this member. // // Note that while this is not documented in any protocol page, // this is usually a serialized GroupMemberMetadata as described in // https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Client-side+Assignment+Proposal. // // The protocol metadata is where group members will communicate which // topics they collectively as a group want to consume. Metadata []byte }
func NewJoinGroupRequestProtocol ¶
func NewJoinGroupRequestProtocol() JoinGroupRequestProtocol
NewJoinGroupRequestProtocol returns a default JoinGroupRequestProtocol This is a shortcut for creating a struct and calling Default yourself.
func (*JoinGroupRequestProtocol) Default ¶
func (v *JoinGroupRequestProtocol) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to JoinGroupRequestProtocol.
type JoinGroupResponse ¶
type JoinGroupResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 3. ThrottleMillis int32 // v2+ // ErrorCode is the error for the join group request. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to the group (no read perms). // // INVALID_GROUP_ID is returned in the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available // (due to the requested broker shutting down or it has not completed startup). // // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is loading. // // NOT_COORDINATOR is returned if the requested broker is not the coordinator // for the requested group. // // INVALID_SESSION_TIMEOUT is returned if the requested SessionTimeout is // not within the broker's group.{min,max}.session.timeout.ms. // // INCONSISTENT_GROUP_PROTOCOL is returned if the requested protocols are // incompatible with the existing group member's protocols, or if the join // was for a new group but contained no protocols. // // UNKNOWN_MEMBER_ID is returned is the requested group is dead (likely // just migrated to another coordinator or the group is temporarily unstable), // or if the request was for a new group but contained a non-empty member ID, // or if the group does not have the requested member ID (and the client must // do the new-join-group dance). // // MEMBER_ID_REQUIRED is returned on the initial join of an existing group. // This error was proposed in KIP-394 and introduced in Kafka 2.2.0 to // prevent flaky clients from continually triggering rebalances and prevent // these clients from consuming RAM with metadata. If a client sees // this error, it should re-issue the join with the MemberID in the response. // Non-flaky clients will join with this new member ID, but flaky clients // will not join quickly enough before the pending member ID is rotated out // due to hitting the session.timeout.ms. // // GROUP_MAX_SIZE_REACHED is returned as of Kafka 2.2.0 if the group has // reached a broker's group.max.size. ErrorCode int16 // Generation is the current "generation" of this group. Generation int32 // ProtocolType is the "type" of protocol being used for this group. ProtocolType *string // v7+ // Protocol is the agreed upon protocol name (i.e. "sticky", "range"). // // v7 of this response changed this field to be nullable. Protocol *string // LeaderID is the leader member. LeaderID string // MemberID is the member of the receiving client. MemberID string // Members contains all other members of this group. Only the group leader // receives the members. The leader is responsible for balancing subscribed // topic partitions and replying appropriately in a SyncGroup request. Members []JoinGroupResponseMember }
JoinGroupResponse is returned from a JoinGroupRequest.
func NewJoinGroupResponse ¶
func NewJoinGroupResponse() JoinGroupResponse
NewJoinGroupResponse returns a default JoinGroupResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrJoinGroupResponse ¶
func NewPtrJoinGroupResponse() *JoinGroupResponse
NewPtrJoinGroupResponse returns a pointer to a default JoinGroupResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*JoinGroupResponse) AppendTo ¶
func (v *JoinGroupResponse) AppendTo(dst []byte) []byte
func (*JoinGroupResponse) Default ¶
func (v *JoinGroupResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to JoinGroupResponse.
func (*JoinGroupResponse) GetVersion ¶
func (v *JoinGroupResponse) GetVersion() int16
func (*JoinGroupResponse) IsFlexible ¶
func (v *JoinGroupResponse) IsFlexible() bool
func (*JoinGroupResponse) Key ¶
func (*JoinGroupResponse) Key() int16
func (*JoinGroupResponse) MaxVersion ¶
func (*JoinGroupResponse) MaxVersion() int16
func (*JoinGroupResponse) ReadFrom ¶
func (v *JoinGroupResponse) ReadFrom(src []byte) error
func (*JoinGroupResponse) RequestKind ¶
func (v *JoinGroupResponse) RequestKind() Request
func (*JoinGroupResponse) SetVersion ¶
func (v *JoinGroupResponse) SetVersion(version int16)
func (*JoinGroupResponse) Throttle ¶ added in v0.6.2
func (v *JoinGroupResponse) Throttle() (int32, bool)
type JoinGroupResponseMember ¶
type JoinGroupResponseMember struct { // MemberID is a member in this group. MemberID string // InstanceID is an instance ID of a member in this group (KIP-345). InstanceID *string // v5+ // ProtocolMetadata is the metadata for this member for this protocol. // This is usually of type GroupMemberMetadata. ProtocolMetadata []byte }
func NewJoinGroupResponseMember ¶
func NewJoinGroupResponseMember() JoinGroupResponseMember
NewJoinGroupResponseMember returns a default JoinGroupResponseMember This is a shortcut for creating a struct and calling Default yourself.
func (*JoinGroupResponseMember) Default ¶
func (v *JoinGroupResponseMember) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to JoinGroupResponseMember.
type LeaderAndISRRequest ¶
type LeaderAndISRRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 ControllerID int32 ControllerEpoch int32 BrokerEpoch int64 // v2+ Type int8 // v5+ PartitionStates []LeaderAndISRRequestTopicPartition TopicStates []LeaderAndISRRequestTopicState // v2+ LiveLeaders []LeaderAndISRRequestLiveLeader }
LeaderAndISRRequest is an advanced request that controller brokers use to broadcast state to other brokers. Manually using this request is a great way to break your cluster.
As this is an advanced request and there is little reason to issue it as a client, this request is undocumented.
Kafka 1.0.0 introduced version 1. Kafka 2.2.0 introduced version 2, proposed in KIP-380, which changed the layout of the struct to be more memory efficient. Kafka 2.4.0 introduced version 3 with KIP-455.
func NewLeaderAndISRRequest ¶
func NewLeaderAndISRRequest() LeaderAndISRRequest
NewLeaderAndISRRequest returns a default LeaderAndISRRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrLeaderAndISRRequest ¶
func NewPtrLeaderAndISRRequest() *LeaderAndISRRequest
NewPtrLeaderAndISRRequest returns a pointer to a default LeaderAndISRRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*LeaderAndISRRequest) AppendTo ¶
func (v *LeaderAndISRRequest) AppendTo(dst []byte) []byte
func (*LeaderAndISRRequest) Default ¶
func (v *LeaderAndISRRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderAndISRRequest.
func (*LeaderAndISRRequest) GetVersion ¶
func (v *LeaderAndISRRequest) GetVersion() int16
func (*LeaderAndISRRequest) IsFlexible ¶
func (v *LeaderAndISRRequest) IsFlexible() bool
func (*LeaderAndISRRequest) Key ¶
func (*LeaderAndISRRequest) Key() int16
func (*LeaderAndISRRequest) MaxVersion ¶
func (*LeaderAndISRRequest) MaxVersion() int16
func (*LeaderAndISRRequest) ReadFrom ¶
func (v *LeaderAndISRRequest) ReadFrom(src []byte) error
func (*LeaderAndISRRequest) RequestWith ¶
func (v *LeaderAndISRRequest) RequestWith(ctx context.Context, r Requestor) (*LeaderAndISRResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*LeaderAndISRRequest) ResponseKind ¶
func (v *LeaderAndISRRequest) ResponseKind() Response
func (*LeaderAndISRRequest) SetVersion ¶
func (v *LeaderAndISRRequest) SetVersion(version int16)
type LeaderAndISRRequestLiveLeader ¶
func NewLeaderAndISRRequestLiveLeader ¶
func NewLeaderAndISRRequestLiveLeader() LeaderAndISRRequestLiveLeader
NewLeaderAndISRRequestLiveLeader returns a default LeaderAndISRRequestLiveLeader This is a shortcut for creating a struct and calling Default yourself.
func (*LeaderAndISRRequestLiveLeader) Default ¶
func (v *LeaderAndISRRequestLiveLeader) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderAndISRRequestLiveLeader.
type LeaderAndISRRequestTopicPartition ¶
type LeaderAndISRRequestTopicPartition struct { Topic string Partition int32 ControllerEpoch int32 Leader int32 LeaderEpoch int32 ISR []int32 ZKVersion int32 Replicas []int32 AddingReplicas []int32 // v3+ RemovingReplicas []int32 // v3+ IsNew bool // v1+ }
LeaderAndISRRequestTopicPartition is a common struct that is used across different versions of LeaderAndISRRequest.
func NewLeaderAndISRRequestTopicPartition ¶
func NewLeaderAndISRRequestTopicPartition() LeaderAndISRRequestTopicPartition
NewLeaderAndISRRequestTopicPartition returns a default LeaderAndISRRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*LeaderAndISRRequestTopicPartition) Default ¶
func (v *LeaderAndISRRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderAndISRRequestTopicPartition.
type LeaderAndISRRequestTopicState ¶
type LeaderAndISRRequestTopicState struct { Topic string TopicID [16]byte // v5+ PartitionStates []LeaderAndISRRequestTopicPartition }
func NewLeaderAndISRRequestTopicState ¶
func NewLeaderAndISRRequestTopicState() LeaderAndISRRequestTopicState
NewLeaderAndISRRequestTopicState returns a default LeaderAndISRRequestTopicState This is a shortcut for creating a struct and calling Default yourself.
func (*LeaderAndISRRequestTopicState) Default ¶
func (v *LeaderAndISRRequestTopicState) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderAndISRRequestTopicState.
type LeaderAndISRResponse ¶
type LeaderAndISRResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 ErrorCode int16 Partitions []LeaderAndISRResponseTopicPartition Topics []LeaderAndISRResponseTopic // v5+ }
LeaderAndISRResponse is returned from a LeaderAndISRRequest.
func NewLeaderAndISRResponse ¶
func NewLeaderAndISRResponse() LeaderAndISRResponse
NewLeaderAndISRResponse returns a default LeaderAndISRResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrLeaderAndISRResponse ¶
func NewPtrLeaderAndISRResponse() *LeaderAndISRResponse
NewPtrLeaderAndISRResponse returns a pointer to a default LeaderAndISRResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*LeaderAndISRResponse) AppendTo ¶
func (v *LeaderAndISRResponse) AppendTo(dst []byte) []byte
func (*LeaderAndISRResponse) Default ¶
func (v *LeaderAndISRResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderAndISRResponse.
func (*LeaderAndISRResponse) GetVersion ¶
func (v *LeaderAndISRResponse) GetVersion() int16
func (*LeaderAndISRResponse) IsFlexible ¶
func (v *LeaderAndISRResponse) IsFlexible() bool
func (*LeaderAndISRResponse) Key ¶
func (*LeaderAndISRResponse) Key() int16
func (*LeaderAndISRResponse) MaxVersion ¶
func (*LeaderAndISRResponse) MaxVersion() int16
func (*LeaderAndISRResponse) ReadFrom ¶
func (v *LeaderAndISRResponse) ReadFrom(src []byte) error
func (*LeaderAndISRResponse) RequestKind ¶
func (v *LeaderAndISRResponse) RequestKind() Request
func (*LeaderAndISRResponse) SetVersion ¶
func (v *LeaderAndISRResponse) SetVersion(version int16)
type LeaderAndISRResponseTopic ¶ added in v0.6.2
type LeaderAndISRResponseTopic struct { TopicID [16]byte Partitions []LeaderAndISRResponseTopicPartition }
func NewLeaderAndISRResponseTopic ¶ added in v0.6.2
func NewLeaderAndISRResponseTopic() LeaderAndISRResponseTopic
NewLeaderAndISRResponseTopic returns a default LeaderAndISRResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*LeaderAndISRResponseTopic) Default ¶ added in v0.6.2
func (v *LeaderAndISRResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderAndISRResponseTopic.
type LeaderAndISRResponseTopicPartition ¶ added in v0.6.2
LeaderAndISRResponseTopicPartition is a common struct that is used across different versions of LeaderAndISRResponse.
func NewLeaderAndISRResponseTopicPartition ¶ added in v0.6.2
func NewLeaderAndISRResponseTopicPartition() LeaderAndISRResponseTopicPartition
NewLeaderAndISRResponseTopicPartition returns a default LeaderAndISRResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*LeaderAndISRResponseTopicPartition) Default ¶ added in v0.6.2
func (v *LeaderAndISRResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderAndISRResponseTopicPartition.
type LeaderChangeMessage ¶ added in v0.6.10
type LeaderChangeMessage struct { Version int16 // The ID of the newly elected leader. LeaderID int32 // The set of voters in the quorum for this epoch. Voters []LeaderChangeMessageVoter // The voters who voted for the leader at the time of election. GrantingVoters []LeaderChangeMessageVoter }
LeaderChangeMessage is the value for a control record when the key is type 3.
func NewLeaderChangeMessage ¶ added in v0.6.10
func NewLeaderChangeMessage() LeaderChangeMessage
NewLeaderChangeMessage returns a default LeaderChangeMessage This is a shortcut for creating a struct and calling Default yourself.
func (*LeaderChangeMessage) AppendTo ¶ added in v0.6.10
func (v *LeaderChangeMessage) AppendTo(dst []byte) []byte
func (*LeaderChangeMessage) Default ¶ added in v0.6.10
func (v *LeaderChangeMessage) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderChangeMessage.
func (*LeaderChangeMessage) IsFlexible ¶ added in v0.6.10
func (v *LeaderChangeMessage) IsFlexible() bool
func (*LeaderChangeMessage) ReadFrom ¶ added in v0.6.10
func (v *LeaderChangeMessage) ReadFrom(src []byte) error
type LeaderChangeMessageVoter ¶ added in v0.6.10
type LeaderChangeMessageVoter struct {
VoterID int32
}
func NewLeaderChangeMessageVoter ¶ added in v0.6.10
func NewLeaderChangeMessageVoter() LeaderChangeMessageVoter
NewLeaderChangeMessageVoter returns a default LeaderChangeMessageVoter This is a shortcut for creating a struct and calling Default yourself.
func (*LeaderChangeMessageVoter) Default ¶ added in v0.6.10
func (v *LeaderChangeMessageVoter) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaderChangeMessageVoter.
type LeaveGroupRequest ¶
type LeaveGroupRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Group is the group to leave. Group string // MemberID is the member that is leaving. MemberID string // Members are member and group instance IDs to cause to leave a group. Members []LeaveGroupRequestMember // v3+ }
LeaveGroupRequest issues a request for a group member to leave the group, triggering a group rebalance.
Version 3 changed removed MemberID and added a batch instance+member ID way of leaving a group.
func NewLeaveGroupRequest ¶
func NewLeaveGroupRequest() LeaveGroupRequest
NewLeaveGroupRequest returns a default LeaveGroupRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrLeaveGroupRequest ¶
func NewPtrLeaveGroupRequest() *LeaveGroupRequest
NewPtrLeaveGroupRequest returns a pointer to a default LeaveGroupRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*LeaveGroupRequest) AppendTo ¶
func (v *LeaveGroupRequest) AppendTo(dst []byte) []byte
func (*LeaveGroupRequest) Default ¶
func (v *LeaveGroupRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaveGroupRequest.
func (*LeaveGroupRequest) GetVersion ¶
func (v *LeaveGroupRequest) GetVersion() int16
func (*LeaveGroupRequest) IsFlexible ¶
func (v *LeaveGroupRequest) IsFlexible() bool
func (*LeaveGroupRequest) IsGroupCoordinatorRequest ¶
func (v *LeaveGroupRequest) IsGroupCoordinatorRequest()
func (*LeaveGroupRequest) Key ¶
func (*LeaveGroupRequest) Key() int16
func (*LeaveGroupRequest) MaxVersion ¶
func (*LeaveGroupRequest) MaxVersion() int16
func (*LeaveGroupRequest) ReadFrom ¶
func (v *LeaveGroupRequest) ReadFrom(src []byte) error
func (*LeaveGroupRequest) RequestWith ¶
func (v *LeaveGroupRequest) RequestWith(ctx context.Context, r Requestor) (*LeaveGroupResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*LeaveGroupRequest) ResponseKind ¶
func (v *LeaveGroupRequest) ResponseKind() Response
func (*LeaveGroupRequest) SetVersion ¶
func (v *LeaveGroupRequest) SetVersion(version int16)
type LeaveGroupRequestMember ¶
func NewLeaveGroupRequestMember ¶
func NewLeaveGroupRequestMember() LeaveGroupRequestMember
NewLeaveGroupRequestMember returns a default LeaveGroupRequestMember This is a shortcut for creating a struct and calling Default yourself.
func (*LeaveGroupRequestMember) Default ¶
func (v *LeaveGroupRequestMember) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaveGroupRequestMember.
type LeaveGroupResponse ¶
type LeaveGroupResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // v1+ // ErrorCode is the error for the leave group request. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to the group (no read perms). // // INVALID_GROUP_ID is returned in the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available // (due to the requested broker shutting down or it has not completed startup). // // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is loading. // // NOT_COORDINATOR is returned if the requested broker is not the coordinator // for the requested group. // // UNKNOWN_MEMBER_ID is returned if the member ID is not a part of the group, // or if the group is empty or dead. ErrorCode int16 // Members are the list of members and group instance IDs that left the group. Members []LeaveGroupResponseMember // v3+ }
LeaveGroupResponse is returned from a LeaveGroupRequest.
func NewLeaveGroupResponse ¶
func NewLeaveGroupResponse() LeaveGroupResponse
NewLeaveGroupResponse returns a default LeaveGroupResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrLeaveGroupResponse ¶
func NewPtrLeaveGroupResponse() *LeaveGroupResponse
NewPtrLeaveGroupResponse returns a pointer to a default LeaveGroupResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*LeaveGroupResponse) AppendTo ¶
func (v *LeaveGroupResponse) AppendTo(dst []byte) []byte
func (*LeaveGroupResponse) Default ¶
func (v *LeaveGroupResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaveGroupResponse.
func (*LeaveGroupResponse) GetVersion ¶
func (v *LeaveGroupResponse) GetVersion() int16
func (*LeaveGroupResponse) IsFlexible ¶
func (v *LeaveGroupResponse) IsFlexible() bool
func (*LeaveGroupResponse) Key ¶
func (*LeaveGroupResponse) Key() int16
func (*LeaveGroupResponse) MaxVersion ¶
func (*LeaveGroupResponse) MaxVersion() int16
func (*LeaveGroupResponse) ReadFrom ¶
func (v *LeaveGroupResponse) ReadFrom(src []byte) error
func (*LeaveGroupResponse) RequestKind ¶
func (v *LeaveGroupResponse) RequestKind() Request
func (*LeaveGroupResponse) SetVersion ¶
func (v *LeaveGroupResponse) SetVersion(version int16)
func (*LeaveGroupResponse) Throttle ¶ added in v0.6.2
func (v *LeaveGroupResponse) Throttle() (int32, bool)
type LeaveGroupResponseMember ¶
type LeaveGroupResponseMember struct { MemberID string InstanceID *string // An individual member's leave error code. ErrorCode int16 }
func NewLeaveGroupResponseMember ¶
func NewLeaveGroupResponseMember() LeaveGroupResponseMember
NewLeaveGroupResponseMember returns a default LeaveGroupResponseMember This is a shortcut for creating a struct and calling Default yourself.
func (*LeaveGroupResponseMember) Default ¶
func (v *LeaveGroupResponseMember) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to LeaveGroupResponseMember.
type ListGroupsRequest ¶
type ListGroupsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // StatesFilter, proposed in KIP-518 and introduced in Kafka 2.6.0, // allows filtering groups by state, where a state is any of // "Preparing", "PreparingRebalance", "CompletingRebalance", "Stable", // "Dead", or "Empty". If empty, all groups are returned. StatesFilter []string // v4+ }
ListGroupsRequest issues a request to list all groups.
To list all groups in a cluster, this must be issued to every broker.
func NewListGroupsRequest ¶
func NewListGroupsRequest() ListGroupsRequest
NewListGroupsRequest returns a default ListGroupsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrListGroupsRequest ¶
func NewPtrListGroupsRequest() *ListGroupsRequest
NewPtrListGroupsRequest returns a pointer to a default ListGroupsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ListGroupsRequest) AppendTo ¶
func (v *ListGroupsRequest) AppendTo(dst []byte) []byte
func (*ListGroupsRequest) Default ¶
func (v *ListGroupsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListGroupsRequest.
func (*ListGroupsRequest) GetVersion ¶
func (v *ListGroupsRequest) GetVersion() int16
func (*ListGroupsRequest) IsFlexible ¶
func (v *ListGroupsRequest) IsFlexible() bool
func (*ListGroupsRequest) Key ¶
func (*ListGroupsRequest) Key() int16
func (*ListGroupsRequest) MaxVersion ¶
func (*ListGroupsRequest) MaxVersion() int16
func (*ListGroupsRequest) ReadFrom ¶
func (v *ListGroupsRequest) ReadFrom(src []byte) error
func (*ListGroupsRequest) RequestWith ¶
func (v *ListGroupsRequest) RequestWith(ctx context.Context, r Requestor) (*ListGroupsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ListGroupsRequest) ResponseKind ¶
func (v *ListGroupsRequest) ResponseKind() Response
func (*ListGroupsRequest) SetVersion ¶
func (v *ListGroupsRequest) SetVersion(version int16)
type ListGroupsResponse ¶
type ListGroupsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // v1+ // ErrorCode is the error returned for the list groups request. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not yet active. // // COORDINATOR_LOAD_IN_PROGRESS is returned if the group manager is loading. ErrorCode int16 // Groups is the list of groups Kafka knows of. Groups []ListGroupsResponseGroup }
ListGroupsResponse is returned from a ListGroupsRequest.
func NewListGroupsResponse ¶
func NewListGroupsResponse() ListGroupsResponse
NewListGroupsResponse returns a default ListGroupsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrListGroupsResponse ¶
func NewPtrListGroupsResponse() *ListGroupsResponse
NewPtrListGroupsResponse returns a pointer to a default ListGroupsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ListGroupsResponse) AppendTo ¶
func (v *ListGroupsResponse) AppendTo(dst []byte) []byte
func (*ListGroupsResponse) Default ¶
func (v *ListGroupsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListGroupsResponse.
func (*ListGroupsResponse) GetVersion ¶
func (v *ListGroupsResponse) GetVersion() int16
func (*ListGroupsResponse) IsFlexible ¶
func (v *ListGroupsResponse) IsFlexible() bool
func (*ListGroupsResponse) Key ¶
func (*ListGroupsResponse) Key() int16
func (*ListGroupsResponse) MaxVersion ¶
func (*ListGroupsResponse) MaxVersion() int16
func (*ListGroupsResponse) ReadFrom ¶
func (v *ListGroupsResponse) ReadFrom(src []byte) error
func (*ListGroupsResponse) RequestKind ¶
func (v *ListGroupsResponse) RequestKind() Request
func (*ListGroupsResponse) SetVersion ¶
func (v *ListGroupsResponse) SetVersion(version int16)
func (*ListGroupsResponse) Throttle ¶ added in v0.6.2
func (v *ListGroupsResponse) Throttle() (int32, bool)
type ListGroupsResponseGroup ¶
type ListGroupsResponseGroup struct { // Group is a Kafka group. Group string // ProtocolType is the protocol type in use by the group. ProtocolType string // The group state. GroupState string // v4+ }
func NewListGroupsResponseGroup ¶
func NewListGroupsResponseGroup() ListGroupsResponseGroup
NewListGroupsResponseGroup returns a default ListGroupsResponseGroup This is a shortcut for creating a struct and calling Default yourself.
func (*ListGroupsResponseGroup) Default ¶
func (v *ListGroupsResponseGroup) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListGroupsResponseGroup.
type ListOffsetsRequest ¶
type ListOffsetsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // ReplicaID is the broker ID to get offsets from. As a Kafka client, use -1. // The consumer replica ID (-1) causes requests to only succeed if issued // against the leader broker. ReplicaID int32 // IsolationLevel configures which record offsets are visible in the // response. READ_UNCOMMITTED (0) makes all records visible. READ_COMMITTED // (1) makes non-transactional and committed transactional records visible. // READ_COMMITTED means all offsets smaller than the last stable offset and // includes aborted transactions (allowing consumers to discard aborted // records). IsolationLevel int8 // v2+ // Topics is an array of topics to get offsets for. Topics []ListOffsetsRequestTopic }
ListOffsetsRequest requests partition offsets from Kafka for use in consuming records.
Version 5, introduced in Kafka 2.2.0, is the same as version 4. Using version 5 implies you support Kafka's OffsetNotAvailableException See KIP-207 for details.
func NewListOffsetsRequest ¶
func NewListOffsetsRequest() ListOffsetsRequest
NewListOffsetsRequest returns a default ListOffsetsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrListOffsetsRequest ¶
func NewPtrListOffsetsRequest() *ListOffsetsRequest
NewPtrListOffsetsRequest returns a pointer to a default ListOffsetsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ListOffsetsRequest) AppendTo ¶
func (v *ListOffsetsRequest) AppendTo(dst []byte) []byte
func (*ListOffsetsRequest) Default ¶
func (v *ListOffsetsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListOffsetsRequest.
func (*ListOffsetsRequest) GetVersion ¶
func (v *ListOffsetsRequest) GetVersion() int16
func (*ListOffsetsRequest) IsFlexible ¶
func (v *ListOffsetsRequest) IsFlexible() bool
func (*ListOffsetsRequest) Key ¶
func (*ListOffsetsRequest) Key() int16
func (*ListOffsetsRequest) MaxVersion ¶
func (*ListOffsetsRequest) MaxVersion() int16
func (*ListOffsetsRequest) ReadFrom ¶
func (v *ListOffsetsRequest) ReadFrom(src []byte) error
func (*ListOffsetsRequest) RequestWith ¶
func (v *ListOffsetsRequest) RequestWith(ctx context.Context, r Requestor) (*ListOffsetsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ListOffsetsRequest) ResponseKind ¶
func (v *ListOffsetsRequest) ResponseKind() Response
func (*ListOffsetsRequest) SetVersion ¶
func (v *ListOffsetsRequest) SetVersion(version int16)
type ListOffsetsRequestTopic ¶
type ListOffsetsRequestTopic struct { // Topic is a topic to get offsets for. Topic string // Partitions is an array of partitions in a topic to get offsets for. Partitions []ListOffsetsRequestTopicPartition }
func NewListOffsetsRequestTopic ¶
func NewListOffsetsRequestTopic() ListOffsetsRequestTopic
NewListOffsetsRequestTopic returns a default ListOffsetsRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*ListOffsetsRequestTopic) Default ¶
func (v *ListOffsetsRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListOffsetsRequestTopic.
type ListOffsetsRequestTopicPartition ¶
type ListOffsetsRequestTopicPartition struct { // Partition is a partition of a topic to get offsets for. Partition int32 // CurrentLeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0, // allows brokers to check if the client is fenced (has an out of date // leader) or is using an unknown leader. // // The initial leader epoch can be determined from a MetadataResponse. // To skip log truncation checking, use -1. CurrentLeaderEpoch int32 // v4+ // Timestamp controls which offset to return in a response for this // partition. // // The offset returned will be the one of the message whose timestamp is // the first timestamp greater than or equal to this requested timestamp. // // If no such message is found, the log end offset is returned. // // There exist two special timestamps: -2 corresponds to the earliest // timestamp, and -1 corresponds to the latest. Timestamp int64 // MaxNumOffsets is the maximum number of offsets to report. // This was removed after v0. MaxNumOffsets int32 }
func NewListOffsetsRequestTopicPartition ¶
func NewListOffsetsRequestTopicPartition() ListOffsetsRequestTopicPartition
NewListOffsetsRequestTopicPartition returns a default ListOffsetsRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*ListOffsetsRequestTopicPartition) Default ¶
func (v *ListOffsetsRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListOffsetsRequestTopicPartition.
type ListOffsetsResponse ¶
type ListOffsetsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 3. ThrottleMillis int32 // v2+ // Topics is an array of topic / partition responses corresponding to // the requested topics and partitions. Topics []ListOffsetsResponseTopic }
ListOffsetsResponse is returned from a ListOffsetsRequest.
func NewListOffsetsResponse ¶
func NewListOffsetsResponse() ListOffsetsResponse
NewListOffsetsResponse returns a default ListOffsetsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrListOffsetsResponse ¶
func NewPtrListOffsetsResponse() *ListOffsetsResponse
NewPtrListOffsetsResponse returns a pointer to a default ListOffsetsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ListOffsetsResponse) AppendTo ¶
func (v *ListOffsetsResponse) AppendTo(dst []byte) []byte
func (*ListOffsetsResponse) Default ¶
func (v *ListOffsetsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListOffsetsResponse.
func (*ListOffsetsResponse) GetVersion ¶
func (v *ListOffsetsResponse) GetVersion() int16
func (*ListOffsetsResponse) IsFlexible ¶
func (v *ListOffsetsResponse) IsFlexible() bool
func (*ListOffsetsResponse) Key ¶
func (*ListOffsetsResponse) Key() int16
func (*ListOffsetsResponse) MaxVersion ¶
func (*ListOffsetsResponse) MaxVersion() int16
func (*ListOffsetsResponse) ReadFrom ¶
func (v *ListOffsetsResponse) ReadFrom(src []byte) error
func (*ListOffsetsResponse) RequestKind ¶
func (v *ListOffsetsResponse) RequestKind() Request
func (*ListOffsetsResponse) SetVersion ¶
func (v *ListOffsetsResponse) SetVersion(version int16)
func (*ListOffsetsResponse) Throttle ¶ added in v0.6.2
func (v *ListOffsetsResponse) Throttle() (int32, bool)
type ListOffsetsResponseTopic ¶
type ListOffsetsResponseTopic struct { // Topic is the topic this array slot is for. Topic string // Partitions is an array of partition responses corresponding to // the requested partitions for a topic. Partitions []ListOffsetsResponseTopicPartition }
func NewListOffsetsResponseTopic ¶
func NewListOffsetsResponseTopic() ListOffsetsResponseTopic
NewListOffsetsResponseTopic returns a default ListOffsetsResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*ListOffsetsResponseTopic) Default ¶
func (v *ListOffsetsResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListOffsetsResponseTopic.
type ListOffsetsResponseTopicPartition ¶
type ListOffsetsResponseTopicPartition struct { // Partition is the partition this array slot is for. Partition int32 // ErrorCode is any error for a topic partition in a ListOffsets request. // // TOPIC_AUTHORIZATION_FAILED is returned if the client is not authorized // to describe the topic. // // INVALID_REQUEST is returned if the requested topic partitions had // contained duplicates. // // KAFKA_STORAGE_EXCEPTION is returned if the topic / partition is in // an offline log directory. // // UNSUPPORTED_FOR_MESSAGE_FORMAT is returned if the broker is using // Kafka 0.10.0 messages and the requested timestamp was not -1 nor -2. // // NOT_LEADER_FOR_PARTITION is returned if the broker is not a leader // for this partition. This means that the client has stale metadata. // If the request used the debug replica ID, the returned error will // be REPLICA_NOT_AVAILABLE. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know // of the requested topic or partition. // // FENCED_LEADER_EPOCH is returned if the broker has a higher leader // epoch than what the request sent. // // UNKNOWN_LEADER_EPOCH is returned if the request used a leader epoch // that the broker does not know about. // // OFFSET_NOT_AVAILABLE, introduced in Kafka 2.2.0 with produce request // v5+, is returned when talking to a broker that is a new leader while // that broker's high water mark catches up. This avoids situations where // the old broker returned higher offsets than the new broker would. Note // that if unclean leader election is allowed, you could still run into // the situation where offsets returned from list offsets requests are // not monotonically increasing. This error is only returned if the // request used the consumer replica ID (-1). If the client did not use // a v5+ list offsets request, LEADER_NOT_AVAILABLE is returned. // See KIP-207 for more details. ErrorCode int16 // OldStyleOffsets is a list of offsets. This was removed after // version 0 and, since it is so historic, is undocumented. OldStyleOffsets []int64 // If the request was for the earliest or latest timestamp (-2 or -1), or // if an offset could not be found after the requested one, this will be -1. Timestamp int64 // v1+ // Offset is the offset corresponding to the record on or after the // requested timestamp. If one could not be found, this will be -1. Offset int64 // v1+ // LeaderEpoch is the leader epoch of the record at this offset, // or -1 if there was no leader epoch. LeaderEpoch int32 // v4+ }
func NewListOffsetsResponseTopicPartition ¶
func NewListOffsetsResponseTopicPartition() ListOffsetsResponseTopicPartition
NewListOffsetsResponseTopicPartition returns a default ListOffsetsResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*ListOffsetsResponseTopicPartition) Default ¶
func (v *ListOffsetsResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListOffsetsResponseTopicPartition.
type ListPartitionReassignmentsRequest ¶
type ListPartitionReassignmentsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TimeoutMillis is how long to wait for the response. TimeoutMillis int32 // Topics are topics to list in progress partition reassignments of, or null // to list everything. Topics []ListPartitionReassignmentsRequestTopic }
ListPartitionReassignmentsRequest, proposed in KIP-455 and implemented in Kafka 2.4.0, is a request to list in progress partition reassignments.
ACL wise, this requires DESCRIBE on CLUSTER.
func NewListPartitionReassignmentsRequest ¶
func NewListPartitionReassignmentsRequest() ListPartitionReassignmentsRequest
NewListPartitionReassignmentsRequest returns a default ListPartitionReassignmentsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrListPartitionReassignmentsRequest ¶
func NewPtrListPartitionReassignmentsRequest() *ListPartitionReassignmentsRequest
NewPtrListPartitionReassignmentsRequest returns a pointer to a default ListPartitionReassignmentsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ListPartitionReassignmentsRequest) AppendTo ¶
func (v *ListPartitionReassignmentsRequest) AppendTo(dst []byte) []byte
func (*ListPartitionReassignmentsRequest) Default ¶
func (v *ListPartitionReassignmentsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListPartitionReassignmentsRequest.
func (*ListPartitionReassignmentsRequest) GetVersion ¶
func (v *ListPartitionReassignmentsRequest) GetVersion() int16
func (*ListPartitionReassignmentsRequest) IsAdminRequest ¶
func (v *ListPartitionReassignmentsRequest) IsAdminRequest()
func (*ListPartitionReassignmentsRequest) IsFlexible ¶
func (v *ListPartitionReassignmentsRequest) IsFlexible() bool
func (*ListPartitionReassignmentsRequest) Key ¶
func (*ListPartitionReassignmentsRequest) Key() int16
func (*ListPartitionReassignmentsRequest) MaxVersion ¶
func (*ListPartitionReassignmentsRequest) MaxVersion() int16
func (*ListPartitionReassignmentsRequest) ReadFrom ¶
func (v *ListPartitionReassignmentsRequest) ReadFrom(src []byte) error
func (*ListPartitionReassignmentsRequest) RequestWith ¶
func (v *ListPartitionReassignmentsRequest) RequestWith(ctx context.Context, r Requestor) (*ListPartitionReassignmentsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ListPartitionReassignmentsRequest) ResponseKind ¶
func (v *ListPartitionReassignmentsRequest) ResponseKind() Response
func (*ListPartitionReassignmentsRequest) SetVersion ¶
func (v *ListPartitionReassignmentsRequest) SetVersion(version int16)
type ListPartitionReassignmentsRequestTopic ¶
type ListPartitionReassignmentsRequestTopic struct { // Topic is a topic to list in progress partition reassingments of. Topic string // Partitions are partitions to list in progress reassignments of. Partitions []int32 }
func NewListPartitionReassignmentsRequestTopic ¶
func NewListPartitionReassignmentsRequestTopic() ListPartitionReassignmentsRequestTopic
NewListPartitionReassignmentsRequestTopic returns a default ListPartitionReassignmentsRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*ListPartitionReassignmentsRequestTopic) Default ¶
func (v *ListPartitionReassignmentsRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListPartitionReassignmentsRequestTopic.
type ListPartitionReassignmentsResponse ¶
type ListPartitionReassignmentsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // ErrorCode is the error code returned for listing reassignments. // // REQUEST_TIMED_OUT is returned if the request timed out. // // NOT_CONTROLLER is returned if the request was not issued to a Kafka // controller. // // CLUSTER_AUTHORIZATION_FAILED is returned if the client is not // authorized to reassign partitions. ErrorCode int16 // ErrorMessage is any global (applied to all partitions) error message. ErrorMessage *string // Topics contains responses for each topic requested. Topics []ListPartitionReassignmentsResponseTopic }
ListPartitionReassignmentsResponse is returned for a ListPartitionReassignmentsRequest.
func NewListPartitionReassignmentsResponse ¶
func NewListPartitionReassignmentsResponse() ListPartitionReassignmentsResponse
NewListPartitionReassignmentsResponse returns a default ListPartitionReassignmentsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrListPartitionReassignmentsResponse ¶
func NewPtrListPartitionReassignmentsResponse() *ListPartitionReassignmentsResponse
NewPtrListPartitionReassignmentsResponse returns a pointer to a default ListPartitionReassignmentsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ListPartitionReassignmentsResponse) AppendTo ¶
func (v *ListPartitionReassignmentsResponse) AppendTo(dst []byte) []byte
func (*ListPartitionReassignmentsResponse) Default ¶
func (v *ListPartitionReassignmentsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListPartitionReassignmentsResponse.
func (*ListPartitionReassignmentsResponse) GetVersion ¶
func (v *ListPartitionReassignmentsResponse) GetVersion() int16
func (*ListPartitionReassignmentsResponse) IsFlexible ¶
func (v *ListPartitionReassignmentsResponse) IsFlexible() bool
func (*ListPartitionReassignmentsResponse) Key ¶
func (*ListPartitionReassignmentsResponse) Key() int16
func (*ListPartitionReassignmentsResponse) MaxVersion ¶
func (*ListPartitionReassignmentsResponse) MaxVersion() int16
func (*ListPartitionReassignmentsResponse) ReadFrom ¶
func (v *ListPartitionReassignmentsResponse) ReadFrom(src []byte) error
func (*ListPartitionReassignmentsResponse) RequestKind ¶
func (v *ListPartitionReassignmentsResponse) RequestKind() Request
func (*ListPartitionReassignmentsResponse) SetVersion ¶
func (v *ListPartitionReassignmentsResponse) SetVersion(version int16)
func (*ListPartitionReassignmentsResponse) Throttle ¶ added in v0.6.2
func (v *ListPartitionReassignmentsResponse) Throttle() (int32, bool)
type ListPartitionReassignmentsResponseTopic ¶
type ListPartitionReassignmentsResponseTopic struct { // Topic is the topic being responded to. Topic string // Partitions contains responses for partitions. Partitions []ListPartitionReassignmentsResponseTopicPartition }
func NewListPartitionReassignmentsResponseTopic ¶
func NewListPartitionReassignmentsResponseTopic() ListPartitionReassignmentsResponseTopic
NewListPartitionReassignmentsResponseTopic returns a default ListPartitionReassignmentsResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*ListPartitionReassignmentsResponseTopic) Default ¶
func (v *ListPartitionReassignmentsResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListPartitionReassignmentsResponseTopic.
type ListPartitionReassignmentsResponseTopicPartition ¶
type ListPartitionReassignmentsResponseTopicPartition struct { // Partition is the partition being responded to. Partition int32 // Replicas is the partition's current replicas. Replicas []int32 // AddingReplicas are replicas currently being added to the partition. AddingReplicas []int32 // RemovingReplicas are replicas currently being removed from the partition. RemovingReplicas []int32 }
func NewListPartitionReassignmentsResponseTopicPartition ¶
func NewListPartitionReassignmentsResponseTopicPartition() ListPartitionReassignmentsResponseTopicPartition
NewListPartitionReassignmentsResponseTopicPartition returns a default ListPartitionReassignmentsResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*ListPartitionReassignmentsResponseTopicPartition) Default ¶
func (v *ListPartitionReassignmentsResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListPartitionReassignmentsResponseTopicPartition.
type ListTransactionsRequest ¶ added in v0.6.10
type ListTransactionsRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The transaction states to filter by: if empty, all transactions are // returned; if non-empty, then only transactions matching one of the // filtered states will be returned. // // For a list of valid states, see the TransactionState enum. StateFilters []string // The producer IDs to filter by: if empty, all transactions will be // returned; if non-empty, only transactions which match one of the filtered // producer IDs will be returned ProducerIDFilters []int64 }
For KIP-664, ListTransactionsRequest lists transactions.
func NewListTransactionsRequest ¶ added in v0.6.10
func NewListTransactionsRequest() ListTransactionsRequest
NewListTransactionsRequest returns a default ListTransactionsRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrListTransactionsRequest ¶ added in v0.6.10
func NewPtrListTransactionsRequest() *ListTransactionsRequest
NewPtrListTransactionsRequest returns a pointer to a default ListTransactionsRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ListTransactionsRequest) AppendTo ¶ added in v0.6.10
func (v *ListTransactionsRequest) AppendTo(dst []byte) []byte
func (*ListTransactionsRequest) Default ¶ added in v0.6.10
func (v *ListTransactionsRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListTransactionsRequest.
func (*ListTransactionsRequest) GetVersion ¶ added in v0.6.10
func (v *ListTransactionsRequest) GetVersion() int16
func (*ListTransactionsRequest) IsFlexible ¶ added in v0.6.10
func (v *ListTransactionsRequest) IsFlexible() bool
func (*ListTransactionsRequest) Key ¶ added in v0.6.10
func (*ListTransactionsRequest) Key() int16
func (*ListTransactionsRequest) MaxVersion ¶ added in v0.6.10
func (*ListTransactionsRequest) MaxVersion() int16
func (*ListTransactionsRequest) ReadFrom ¶ added in v0.6.10
func (v *ListTransactionsRequest) ReadFrom(src []byte) error
func (*ListTransactionsRequest) RequestWith ¶ added in v0.6.10
func (v *ListTransactionsRequest) RequestWith(ctx context.Context, r Requestor) (*ListTransactionsResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ListTransactionsRequest) ResponseKind ¶ added in v0.6.10
func (v *ListTransactionsRequest) ResponseKind() Response
func (*ListTransactionsRequest) SetVersion ¶ added in v0.6.10
func (v *ListTransactionsRequest) SetVersion(version int16)
type ListTransactionsResponse ¶ added in v0.6.10
type ListTransactionsResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // A potential error code for the listing, // // COORDINATOR_LOAD_IN_PROGRESS is returned if the coordinator is loading. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator receiving this // request is shutting down. ErrorCode int16 // Set of state filters provided in the request which were unknown to the // transaction coordinator. UnknownStateFilters []string // TransactionStates contains all transactions that were matched for listing // in the request. The response elides transactions that the user does not have // permission to describe (DESCRIBE on TRANSACTIONAL_ID for the transaction). TransactionStates []ListTransactionsResponseTransactionState }
ListTransactionsResponse is a response to a ListTransactionsRequest.
func NewListTransactionsResponse ¶ added in v0.6.10
func NewListTransactionsResponse() ListTransactionsResponse
NewListTransactionsResponse returns a default ListTransactionsResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrListTransactionsResponse ¶ added in v0.6.10
func NewPtrListTransactionsResponse() *ListTransactionsResponse
NewPtrListTransactionsResponse returns a pointer to a default ListTransactionsResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ListTransactionsResponse) AppendTo ¶ added in v0.6.10
func (v *ListTransactionsResponse) AppendTo(dst []byte) []byte
func (*ListTransactionsResponse) Default ¶ added in v0.6.10
func (v *ListTransactionsResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListTransactionsResponse.
func (*ListTransactionsResponse) GetVersion ¶ added in v0.6.10
func (v *ListTransactionsResponse) GetVersion() int16
func (*ListTransactionsResponse) IsFlexible ¶ added in v0.6.10
func (v *ListTransactionsResponse) IsFlexible() bool
func (*ListTransactionsResponse) Key ¶ added in v0.6.10
func (*ListTransactionsResponse) Key() int16
func (*ListTransactionsResponse) MaxVersion ¶ added in v0.6.10
func (*ListTransactionsResponse) MaxVersion() int16
func (*ListTransactionsResponse) ReadFrom ¶ added in v0.6.10
func (v *ListTransactionsResponse) ReadFrom(src []byte) error
func (*ListTransactionsResponse) RequestKind ¶ added in v0.6.10
func (v *ListTransactionsResponse) RequestKind() Request
func (*ListTransactionsResponse) SetVersion ¶ added in v0.6.10
func (v *ListTransactionsResponse) SetVersion(version int16)
func (*ListTransactionsResponse) Throttle ¶ added in v0.6.10
func (v *ListTransactionsResponse) Throttle() (int32, bool)
type ListTransactionsResponseTransactionState ¶ added in v0.6.10
type ListTransactionsResponseTransactionState struct { // The transactional ID being used. TransactionalID string // The producer ID of the producer. ProducerID int64 // The current transaction state of the producer. TransactionState string }
func NewListTransactionsResponseTransactionState ¶ added in v0.6.10
func NewListTransactionsResponseTransactionState() ListTransactionsResponseTransactionState
NewListTransactionsResponseTransactionState returns a default ListTransactionsResponseTransactionState This is a shortcut for creating a struct and calling Default yourself.
func (*ListTransactionsResponseTransactionState) Default ¶ added in v0.6.10
func (v *ListTransactionsResponseTransactionState) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ListTransactionsResponseTransactionState.
type MessageV0 ¶
type MessageV0 struct { // Offset is the offset of this record. // // If this is the outer message of a recursive message set (i.e. a // message set has been compressed and this is the outer message), // then the offset should be the offset of the last inner value. Offset int64 // MessageSize is the size of everything that follows in this message. MessageSize int32 // CRC is the crc of everything that follows this field (NOT using the // Castagnoli polynomial, as is the case in the 0.11+ RecordBatch). CRC int32 // Magic is 0. Magic int8 // Attributes describe the attributes of this message. // // Bits 0 thru 2 correspond to compression: // - 00 is no compression // - 01 is gzip compression // - 10 is snappy compression // // The remaining bits are unused and must be 0. Attributes int8 // Key is an blob of data for a record. // // Key's are usually used for hashing the record to specific Kafka partitions. Key []byte // Value is a blob of data. This field is the main "message" portion of a // record. Value []byte }
MessageV0 is the message format Kafka used prior to 0.10.
To produce or fetch messages, Kafka would write many messages contiguously as an array without specifying the array length.
func NewMessageV0 ¶
func NewMessageV0() MessageV0
NewMessageV0 returns a default MessageV0 This is a shortcut for creating a struct and calling Default yourself.
type MessageV1 ¶
type MessageV1 struct { // Offset is the offset of this record. // // Different from v0, if this message set is a recursive message set // (that is, compressed and inside another message set), the offset // on the inner set is relative to the offset of the outer set. Offset int64 // MessageSize is the size of everything that follows in this message. MessageSize int32 // CRC is the crc of everything that follows this field (NOT using the // Castagnoli polynomial, as is the case in the 0.11+ RecordBatch). CRC int32 // Magic is 1. Magic int8 // Attributes describe the attributes of this message. // // Bits 0 thru 2 correspond to compression: // - 00 is no compression // - 01 is gzip compression // - 10 is snappy compression // // Bit 3 is the timestamp type, with 0 meaning CreateTime corresponding // to the timestamp being from the producer, and 1 meaning LogAppendTime // corresponding to the timestamp being from the broker. // Setting this to LogAppendTime will cause batches to be rejected. // // The remaining bits are unused and must be 0. Attributes int8 // Timestamp is the millisecond timestamp of this message. Timestamp int64 // Key is an blob of data for a record. // // Key's are usually used for hashing the record to specific Kafka partitions. Key []byte // Value is a blob of data. This field is the main "message" portion of a // record. Value []byte }
MessageV1 is the message format Kafka used prior to 0.11.
To produce or fetch messages, Kafka would write many messages contiguously as an array without specifying the array length.
To support compression, an entire message set would be compressed and used as the Value in another message set (thus being "recursive"). The key for this outer message set must be null.
func NewMessageV1 ¶
func NewMessageV1() MessageV1
NewMessageV1 returns a default MessageV1 This is a shortcut for creating a struct and calling Default yourself.
type MetadataRequest ¶
type MetadataRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Topics is a list of topics to return metadata about. If this is null // in v1+, all topics are included. If this is empty, no topics are. // For v0 (<Kafka 0.10.0.0), if this is empty, all topics are included. Topics []MetadataRequestTopic // AllowAutoTopicCreation, introduced in Kafka 0.11.0.0, allows topic // auto creation of the topics in this request if they do not exist. AllowAutoTopicCreation bool // v4+ // IncludeClusterAuthorizedOperations, introduced in Kakfa 2.3.0, specifies // whether to return a bitfield of AclOperations that this client can perform // on the cluster. See KIP-430 for more details. // // This field was removed in Kafka 2.8.0 in favor of the new DescribeClusterRequest. IncludeClusterAuthorizedOperations bool // v8+ // IncludeTopicAuthorizedOperations, introduced in Kakfa 2.3.0, specifies // whether to return a bitfield of AclOperations that this client can perform // on individual topics. See KIP-430 for more details. // // This field was removed in Kafka 2.8.0 in favor of the new DescribeClusterRequest. IncludeTopicAuthorizedOperations bool // v8+ }
MetadataRequest requests metadata from Kafka.
func NewMetadataRequest ¶
func NewMetadataRequest() MetadataRequest
NewMetadataRequest returns a default MetadataRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrMetadataRequest ¶
func NewPtrMetadataRequest() *MetadataRequest
NewPtrMetadataRequest returns a pointer to a default MetadataRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*MetadataRequest) AppendTo ¶
func (v *MetadataRequest) AppendTo(dst []byte) []byte
func (*MetadataRequest) Default ¶
func (v *MetadataRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to MetadataRequest.
func (*MetadataRequest) GetVersion ¶
func (v *MetadataRequest) GetVersion() int16
func (*MetadataRequest) IsFlexible ¶
func (v *MetadataRequest) IsFlexible() bool
func (*MetadataRequest) Key ¶
func (*MetadataRequest) Key() int16
func (*MetadataRequest) MaxVersion ¶
func (*MetadataRequest) MaxVersion() int16
func (*MetadataRequest) ReadFrom ¶
func (v *MetadataRequest) ReadFrom(src []byte) error
func (*MetadataRequest) RequestWith ¶
func (v *MetadataRequest) RequestWith(ctx context.Context, r Requestor) (*MetadataResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*MetadataRequest) ResponseKind ¶
func (v *MetadataRequest) ResponseKind() Response
func (*MetadataRequest) SetVersion ¶
func (v *MetadataRequest) SetVersion(version int16)
type MetadataRequestTopic ¶
type MetadataRequestTopic struct { // The topic ID. Only one of either topic ID or topic name should be used. // If using the topic name, this should just be the default empty value. TopicID [16]byte // v10+ // Topic is the topic to request metadata for. Version 10 switched this // from a string to a nullable string; if using a topic ID, this field // should be null. Topic *string }
func NewMetadataRequestTopic ¶
func NewMetadataRequestTopic() MetadataRequestTopic
NewMetadataRequestTopic returns a default MetadataRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*MetadataRequestTopic) Default ¶
func (v *MetadataRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to MetadataRequestTopic.
type MetadataResponse ¶
type MetadataResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 6. ThrottleMillis int32 // v3+ // Brokers is a set of alive Kafka brokers. Brokers []MetadataResponseBroker // ClusterID, proposed in KIP-78 and introduced in Kafka 0.10.1.0, is a // unique string specifying the cluster that the replying Kafka belongs to. ClusterID *string // v2+ // ControllerID is the ID of the controller broker (the admin broker). ControllerID int32 // v1+ // Topics contains metadata about each topic requested in the // MetadataRequest. Topics []MetadataResponseTopic // AuthorizedOperations is a bitfield containing which operations the client // is allowed to perform on this cluster. AuthorizedOperations int32 // v8+ }
MetadataResponse is returned from a MetdataRequest.
func NewMetadataResponse ¶
func NewMetadataResponse() MetadataResponse
NewMetadataResponse returns a default MetadataResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrMetadataResponse ¶
func NewPtrMetadataResponse() *MetadataResponse
NewPtrMetadataResponse returns a pointer to a default MetadataResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*MetadataResponse) AppendTo ¶
func (v *MetadataResponse) AppendTo(dst []byte) []byte
func (*MetadataResponse) Default ¶
func (v *MetadataResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to MetadataResponse.
func (*MetadataResponse) GetVersion ¶
func (v *MetadataResponse) GetVersion() int16
func (*MetadataResponse) IsFlexible ¶
func (v *MetadataResponse) IsFlexible() bool
func (*MetadataResponse) Key ¶
func (*MetadataResponse) Key() int16
func (*MetadataResponse) MaxVersion ¶
func (*MetadataResponse) MaxVersion() int16
func (*MetadataResponse) ReadFrom ¶
func (v *MetadataResponse) ReadFrom(src []byte) error
func (*MetadataResponse) RequestKind ¶
func (v *MetadataResponse) RequestKind() Request
func (*MetadataResponse) SetVersion ¶
func (v *MetadataResponse) SetVersion(version int16)
func (*MetadataResponse) Throttle ¶ added in v0.6.2
func (v *MetadataResponse) Throttle() (int32, bool)
type MetadataResponseBroker ¶
type MetadataResponseBroker struct { // NodeID is the node ID of a Kafka broker. NodeID int32 // Host is the hostname of a Kafka broker. Host string // Port is the port of a Kafka broker. Port int32 // Rack is the rack this Kafka broker is in. Rack *string // v1+ }
func NewMetadataResponseBroker ¶
func NewMetadataResponseBroker() MetadataResponseBroker
NewMetadataResponseBroker returns a default MetadataResponseBroker This is a shortcut for creating a struct and calling Default yourself.
func (*MetadataResponseBroker) Default ¶
func (v *MetadataResponseBroker) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to MetadataResponseBroker.
type MetadataResponseTopic ¶
type MetadataResponseTopic struct { // ErrorCode is any error for a topic in a metadata request. // // TOPIC_AUTHORIZATION_FAILED is returned if the client is not authorized // to describe the topic, or if the metadata request specified topic auto // creation, the topic did not exist, and the user lacks permission to create. // // UNKNOWN_TOPIC_OR_PARTITION is returned if a topic does not exist and // the request did not specify autocreation. // // LEADER_NOT_AVAILABLE is returned if a new topic is created successfully // (since there is no leader on an immediately new topic). // // There can be a myriad of other errors for unsuccessful topic creation. ErrorCode int16 // Topic is the topic this metadata corresponds to. Topic string // The topic ID. TopicID [16]byte // v10+ // IsInternal signifies whether this topic is a Kafka internal topic. IsInternal bool // v1+ // Partitions contains metadata about partitions for a topic. Partitions []MetadataResponseTopicPartition // AuthorizedOperations, proposed in KIP-430 and introduced in Kafka 2.3.0, // is a bitfield (corresponding to AclOperation) containing which operations // the client is allowed to perform on this topic. // This is only returned if requested. AuthorizedOperations int32 // v8+ }
func NewMetadataResponseTopic ¶
func NewMetadataResponseTopic() MetadataResponseTopic
NewMetadataResponseTopic returns a default MetadataResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*MetadataResponseTopic) Default ¶
func (v *MetadataResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to MetadataResponseTopic.
type MetadataResponseTopicPartition ¶
type MetadataResponseTopicPartition struct { // ErrorCode is any error for a partition in topic metadata. // // LEADER_NOT_AVAILABLE is returned if a leader is unavailable for this // partition. For v0 metadata responses, this is also returned if a // partition leader's listener does not exist. // // LISTENER_NOT_FOUND is returned if a leader ID is known but the // listener for it is not (v1+). // // REPLICA_NOT_AVAILABLE is returned in v0 responses if any replica is // unavailable. // // UNKNOWN_TOPIC_ID is returned if using a topic ID and the ID does not // exist. ErrorCode int16 // Partition is a partition number for a topic. Partition int32 // Leader is the broker leader for this partition. This will be -1 // on leader / listener error. Leader int32 // LeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0 is the // epoch of the broker leader. LeaderEpoch int32 // v7+ // Replicas returns all broker IDs containing replicas of this partition. Replicas []int32 // ISR returns all broker IDs of in-sync replicas of this partition. ISR []int32 // OfflineReplicas, proposed in KIP-112 and introduced in Kafka 1.0, // returns all offline broker IDs that should be replicating this partition. OfflineReplicas []int32 // v5+ }
func NewMetadataResponseTopicPartition ¶
func NewMetadataResponseTopicPartition() MetadataResponseTopicPartition
NewMetadataResponseTopicPartition returns a default MetadataResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*MetadataResponseTopicPartition) Default ¶
func (v *MetadataResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to MetadataResponseTopicPartition.
type OffsetCommitKey ¶
type OffsetCommitKey struct { // Version is which encoding version this value is using. Version int16 // Group is the group being committed. Group string // Topic is the topic being committed. Topic string // Partition is the partition being committed. Partition int32 }
OffsetCommitKey is the key for the Kafka internal __consumer_offsets topic if the key starts with an int16 with a value of 0 or 1.
This type was introduced in KAFKA-1012 commit a670537aa3 with release 0.8.2 and has been in use ever since.
func NewOffsetCommitKey ¶
func NewOffsetCommitKey() OffsetCommitKey
NewOffsetCommitKey returns a default OffsetCommitKey This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetCommitKey) AppendTo ¶
func (v *OffsetCommitKey) AppendTo(dst []byte) []byte
func (*OffsetCommitKey) Default ¶
func (v *OffsetCommitKey) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetCommitKey.
func (*OffsetCommitKey) ReadFrom ¶
func (v *OffsetCommitKey) ReadFrom(src []byte) error
type OffsetCommitRequest ¶
type OffsetCommitRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Group is the group this request is committing offsets to. Group string // Generation being -1 and group being empty means the group is being used // to store offsets only. No generation validation, no rebalancing. Generation int32 // v1+ // MemberID is the ID of the client issuing this request in the group. MemberID string // v1+ // InstanceID is the instance ID of this member in the group (KIP-345). InstanceID *string // v7+ // RetentionTimeMillis is how long this commit will persist in Kafka. // // This was introduced in v2, replacing an individual topic/partition's // Timestamp from v1, and was removed in v5 with Kafka 2.1.0. // // This was removed because rarely committing consumers could have their // offsets expired before committing, even though the consumer was still // active. After restarting or rebalancing, the consumer would now not know // the last committed offset and would have to start at the beginning or end, // leading to duplicates or log loss. // // Post 2.1.0, if this field is empty, offsets are only deleted once the // group is empty. Read KIP-211 for more details. RetentionTimeMillis int64 // v2+ // Topics is contains topics and partitions for which to commit offsets. Topics []OffsetCommitRequestTopic }
OffsetCommitRequest commits offsets for consumed topics / partitions in a group.
func NewOffsetCommitRequest ¶
func NewOffsetCommitRequest() OffsetCommitRequest
NewOffsetCommitRequest returns a default OffsetCommitRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrOffsetCommitRequest ¶
func NewPtrOffsetCommitRequest() *OffsetCommitRequest
NewPtrOffsetCommitRequest returns a pointer to a default OffsetCommitRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*OffsetCommitRequest) AppendTo ¶
func (v *OffsetCommitRequest) AppendTo(dst []byte) []byte
func (*OffsetCommitRequest) Default ¶
func (v *OffsetCommitRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetCommitRequest.
func (*OffsetCommitRequest) GetVersion ¶
func (v *OffsetCommitRequest) GetVersion() int16
func (*OffsetCommitRequest) IsFlexible ¶
func (v *OffsetCommitRequest) IsFlexible() bool
func (*OffsetCommitRequest) IsGroupCoordinatorRequest ¶
func (v *OffsetCommitRequest) IsGroupCoordinatorRequest()
func (*OffsetCommitRequest) Key ¶
func (*OffsetCommitRequest) Key() int16
func (*OffsetCommitRequest) MaxVersion ¶
func (*OffsetCommitRequest) MaxVersion() int16
func (*OffsetCommitRequest) ReadFrom ¶
func (v *OffsetCommitRequest) ReadFrom(src []byte) error
func (*OffsetCommitRequest) RequestWith ¶
func (v *OffsetCommitRequest) RequestWith(ctx context.Context, r Requestor) (*OffsetCommitResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*OffsetCommitRequest) ResponseKind ¶
func (v *OffsetCommitRequest) ResponseKind() Response
func (*OffsetCommitRequest) SetVersion ¶
func (v *OffsetCommitRequest) SetVersion(version int16)
type OffsetCommitRequestTopic ¶
type OffsetCommitRequestTopic struct { // Topic is a topic to commit offsets for. Topic string // Partitions contains partitions in a topic for which to commit offsets. Partitions []OffsetCommitRequestTopicPartition }
func NewOffsetCommitRequestTopic ¶
func NewOffsetCommitRequestTopic() OffsetCommitRequestTopic
NewOffsetCommitRequestTopic returns a default OffsetCommitRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetCommitRequestTopic) Default ¶
func (v *OffsetCommitRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetCommitRequestTopic.
type OffsetCommitRequestTopicPartition ¶
type OffsetCommitRequestTopicPartition struct { // Partition if a partition to commit offsets for. Partition int32 // Offset is an offset to commit. Offset int64 // Timestamp is the first iteration of tracking how long offset commits // should persist in Kafka. This field only existed for v1. // The expiration would be timestamp + offset.retention.minutes, or, if // timestamp was zero, current time + offset.retention.minutes. Timestamp int64 // v1+ // LeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0, // is the leader epoch of the record this request is committing. // // The initial leader epoch can be determined from a MetadataResponse. // To skip log truncation checking, use -1. LeaderEpoch int32 // v6+ // Metadata is optional data to include with committing the offset. This // can contain information such as which node is doing the committing, etc. Metadata *string }
func NewOffsetCommitRequestTopicPartition ¶
func NewOffsetCommitRequestTopicPartition() OffsetCommitRequestTopicPartition
NewOffsetCommitRequestTopicPartition returns a default OffsetCommitRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetCommitRequestTopicPartition) Default ¶
func (v *OffsetCommitRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetCommitRequestTopicPartition.
type OffsetCommitResponse ¶
type OffsetCommitResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 4. ThrottleMillis int32 // v3+ // Topics contains responses for each topic / partition in the commit request. Topics []OffsetCommitResponseTopic }
OffsetCommitResponse is returned from an OffsetCommitRequest.
func NewOffsetCommitResponse ¶
func NewOffsetCommitResponse() OffsetCommitResponse
NewOffsetCommitResponse returns a default OffsetCommitResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrOffsetCommitResponse ¶
func NewPtrOffsetCommitResponse() *OffsetCommitResponse
NewPtrOffsetCommitResponse returns a pointer to a default OffsetCommitResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*OffsetCommitResponse) AppendTo ¶
func (v *OffsetCommitResponse) AppendTo(dst []byte) []byte
func (*OffsetCommitResponse) Default ¶
func (v *OffsetCommitResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetCommitResponse.
func (*OffsetCommitResponse) GetVersion ¶
func (v *OffsetCommitResponse) GetVersion() int16
func (*OffsetCommitResponse) IsFlexible ¶
func (v *OffsetCommitResponse) IsFlexible() bool
func (*OffsetCommitResponse) Key ¶
func (*OffsetCommitResponse) Key() int16
func (*OffsetCommitResponse) MaxVersion ¶
func (*OffsetCommitResponse) MaxVersion() int16
func (*OffsetCommitResponse) ReadFrom ¶
func (v *OffsetCommitResponse) ReadFrom(src []byte) error
func (*OffsetCommitResponse) RequestKind ¶
func (v *OffsetCommitResponse) RequestKind() Request
func (*OffsetCommitResponse) SetVersion ¶
func (v *OffsetCommitResponse) SetVersion(version int16)
func (*OffsetCommitResponse) Throttle ¶ added in v0.6.2
func (v *OffsetCommitResponse) Throttle() (int32, bool)
type OffsetCommitResponseTopic ¶
type OffsetCommitResponseTopic struct { // Topic is the topic this offset commit response corresponds to. Topic string // Partitions contains responses for each requested partition in // a topic. Partitions []OffsetCommitResponseTopicPartition }
func NewOffsetCommitResponseTopic ¶
func NewOffsetCommitResponseTopic() OffsetCommitResponseTopic
NewOffsetCommitResponseTopic returns a default OffsetCommitResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetCommitResponseTopic) Default ¶
func (v *OffsetCommitResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetCommitResponseTopic.
type OffsetCommitResponseTopicPartition ¶
type OffsetCommitResponseTopicPartition struct { // Partition is the partition in a topic this array slot corresponds to. Partition int32 // ErrorCode is the error for this partition response. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // for the group. // // TOPIC_AUTHORIZATION_FAILED is returned if the client is not authorized // for the topic / partition. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the topic / partition does // not exist. // // OFFSET_METADATA_TOO_LARGE is returned if the request metadata is // larger than the brokers offset.metadata.max.bytes. // // INVALID_GROUP_ID is returned in the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available // (due to the requested broker shutting down or it has not completed startup). // // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is loading. // // NOT_COORDINATOR is returned if the requested broker is not the coordinator // for the requested group. // // ILLEGAL_GENERATION is returned if the request's generation ID is invalid. // // UNKNOWN_MEMBER_ID is returned if the group is dead or the group does not // know of the request's member ID. // // REBALANCE_IN_PROGRESS is returned if the group is finishing a rebalance. // // INVALID_COMMIT_OFFSET_SIZE is returned if the offset commit results in // a record batch that is too large (likely due to large metadata). ErrorCode int16 }
func NewOffsetCommitResponseTopicPartition ¶
func NewOffsetCommitResponseTopicPartition() OffsetCommitResponseTopicPartition
NewOffsetCommitResponseTopicPartition returns a default OffsetCommitResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetCommitResponseTopicPartition) Default ¶
func (v *OffsetCommitResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetCommitResponseTopicPartition.
type OffsetCommitValue ¶
type OffsetCommitValue struct { // Version is which encoding version this value is using. Version int16 // Offset is the committed offset. Offset int64 // LeaderEpoch is the epoch of the leader committing this message. LeaderEpoch int32 // v3+ // Metadata is the metadata included in the commit. Metadata string // CommitTimestamp is when this commit occurred. CommitTimestamp int64 // ExpireTimestamp, introduced in v1 and dropped in v2 with KIP-111, // is when this commit expires. ExpireTimestamp int64 // v1+ }
OffsetCommitValue is the value for the Kafka internal __consumer_offsets topic if the key is of OffsetCommitKey type.
Version 0 was introduced with the key version 0.
KAFKA-1634 commit c5df2a8e3a in 0.9.0 released version 1.
KAFKA-4682 commit 418a91b5d4, proposed in KIP-211 and included in 2.1.0 released version 2.
KAFKA-7437 commit 9f7267dd2f, proposed in KIP-320 and included in 2.1.0 released version 3.
func NewOffsetCommitValue ¶
func NewOffsetCommitValue() OffsetCommitValue
NewOffsetCommitValue returns a default OffsetCommitValue This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetCommitValue) AppendTo ¶
func (v *OffsetCommitValue) AppendTo(dst []byte) []byte
func (*OffsetCommitValue) Default ¶
func (v *OffsetCommitValue) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetCommitValue.
func (*OffsetCommitValue) ReadFrom ¶
func (v *OffsetCommitValue) ReadFrom(src []byte) error
type OffsetDeleteRequest ¶
type OffsetDeleteRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Group is the group to delete offsets in. Group string // Topics are topics to delete offsets in. Topics []OffsetDeleteRequestTopic }
OffsetDeleteRequest, proposed in KIP-496 and implemented in Kafka 2.4.0, is a request to delete group offsets.
ACL wise, this requires DELETE on GROUP for the group and READ on TOPIC for each topic.
func NewOffsetDeleteRequest ¶
func NewOffsetDeleteRequest() OffsetDeleteRequest
NewOffsetDeleteRequest returns a default OffsetDeleteRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrOffsetDeleteRequest ¶
func NewPtrOffsetDeleteRequest() *OffsetDeleteRequest
NewPtrOffsetDeleteRequest returns a pointer to a default OffsetDeleteRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*OffsetDeleteRequest) AppendTo ¶
func (v *OffsetDeleteRequest) AppendTo(dst []byte) []byte
func (*OffsetDeleteRequest) Default ¶
func (v *OffsetDeleteRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetDeleteRequest.
func (*OffsetDeleteRequest) GetVersion ¶
func (v *OffsetDeleteRequest) GetVersion() int16
func (*OffsetDeleteRequest) IsFlexible ¶
func (v *OffsetDeleteRequest) IsFlexible() bool
func (*OffsetDeleteRequest) IsGroupCoordinatorRequest ¶
func (v *OffsetDeleteRequest) IsGroupCoordinatorRequest()
func (*OffsetDeleteRequest) Key ¶
func (*OffsetDeleteRequest) Key() int16
func (*OffsetDeleteRequest) MaxVersion ¶
func (*OffsetDeleteRequest) MaxVersion() int16
func (*OffsetDeleteRequest) ReadFrom ¶
func (v *OffsetDeleteRequest) ReadFrom(src []byte) error
func (*OffsetDeleteRequest) RequestWith ¶
func (v *OffsetDeleteRequest) RequestWith(ctx context.Context, r Requestor) (*OffsetDeleteResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*OffsetDeleteRequest) ResponseKind ¶
func (v *OffsetDeleteRequest) ResponseKind() Response
func (*OffsetDeleteRequest) SetVersion ¶
func (v *OffsetDeleteRequest) SetVersion(version int16)
type OffsetDeleteRequestTopic ¶
type OffsetDeleteRequestTopic struct { // Topic is a topic to delete offsets in. Topic string // Partitions are partitions to delete offsets for. Partitions []OffsetDeleteRequestTopicPartition }
func NewOffsetDeleteRequestTopic ¶
func NewOffsetDeleteRequestTopic() OffsetDeleteRequestTopic
NewOffsetDeleteRequestTopic returns a default OffsetDeleteRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetDeleteRequestTopic) Default ¶
func (v *OffsetDeleteRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetDeleteRequestTopic.
type OffsetDeleteRequestTopicPartition ¶
type OffsetDeleteRequestTopicPartition struct { // Partition is a partition to delete offsets for. Partition int32 }
func NewOffsetDeleteRequestTopicPartition ¶
func NewOffsetDeleteRequestTopicPartition() OffsetDeleteRequestTopicPartition
NewOffsetDeleteRequestTopicPartition returns a default OffsetDeleteRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetDeleteRequestTopicPartition) Default ¶
func (v *OffsetDeleteRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetDeleteRequestTopicPartition.
type OffsetDeleteResponse ¶
type OffsetDeleteResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ErrorCode is any group wide error. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // for the group. // // INVALID_GROUP_ID is returned in the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available. // // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is loading. // // NOT_COORDINATOR is returned if the requested broker is not the coordinator // for the requested group. // // GROUP_ID_NOT_FOUND is returned if the group ID does not exist. ErrorCode int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // Topics are responses to requested topics. Topics []OffsetDeleteResponseTopic }
OffsetDeleteResponse is a response to an offset delete request.
func NewOffsetDeleteResponse ¶
func NewOffsetDeleteResponse() OffsetDeleteResponse
NewOffsetDeleteResponse returns a default OffsetDeleteResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrOffsetDeleteResponse ¶
func NewPtrOffsetDeleteResponse() *OffsetDeleteResponse
NewPtrOffsetDeleteResponse returns a pointer to a default OffsetDeleteResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*OffsetDeleteResponse) AppendTo ¶
func (v *OffsetDeleteResponse) AppendTo(dst []byte) []byte
func (*OffsetDeleteResponse) Default ¶
func (v *OffsetDeleteResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetDeleteResponse.
func (*OffsetDeleteResponse) GetVersion ¶
func (v *OffsetDeleteResponse) GetVersion() int16
func (*OffsetDeleteResponse) IsFlexible ¶
func (v *OffsetDeleteResponse) IsFlexible() bool
func (*OffsetDeleteResponse) Key ¶
func (*OffsetDeleteResponse) Key() int16
func (*OffsetDeleteResponse) MaxVersion ¶
func (*OffsetDeleteResponse) MaxVersion() int16
func (*OffsetDeleteResponse) ReadFrom ¶
func (v *OffsetDeleteResponse) ReadFrom(src []byte) error
func (*OffsetDeleteResponse) RequestKind ¶
func (v *OffsetDeleteResponse) RequestKind() Request
func (*OffsetDeleteResponse) SetVersion ¶
func (v *OffsetDeleteResponse) SetVersion(version int16)
func (*OffsetDeleteResponse) Throttle ¶ added in v0.6.2
func (v *OffsetDeleteResponse) Throttle() (int32, bool)
type OffsetDeleteResponseTopic ¶
type OffsetDeleteResponseTopic struct { // Topic is the topic being responded to. Topic string // Partitions are partitions being responded to. Partitions []OffsetDeleteResponseTopicPartition }
func NewOffsetDeleteResponseTopic ¶
func NewOffsetDeleteResponseTopic() OffsetDeleteResponseTopic
NewOffsetDeleteResponseTopic returns a default OffsetDeleteResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetDeleteResponseTopic) Default ¶
func (v *OffsetDeleteResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetDeleteResponseTopic.
type OffsetDeleteResponseTopicPartition ¶
type OffsetDeleteResponseTopicPartition struct { // Partition is the partition being responded to. Partition int32 // ErrorCode is any per partition error code. // // TOPIC_AUTHORIZATION_FAILED is returned if the client is not authorized // for the topic / partition. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of // the requested topic. // // GROUP_SUBSCRIBED_TO_TOPIC is returned if the topic is still subscribed to. ErrorCode int16 }
func NewOffsetDeleteResponseTopicPartition ¶
func NewOffsetDeleteResponseTopicPartition() OffsetDeleteResponseTopicPartition
NewOffsetDeleteResponseTopicPartition returns a default OffsetDeleteResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetDeleteResponseTopicPartition) Default ¶
func (v *OffsetDeleteResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetDeleteResponseTopicPartition.
type OffsetFetchRequest ¶
type OffsetFetchRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Group is the group to fetch offsets for. Group string // Topics contains topics to fetch offets for. Version 2+ allows this to be // null to return all topics the client is authorized to describe in the group. Topics []OffsetFetchRequestTopic // RequireStable signifies whether the broker should wait on returning // unstable offsets, instead setting a retriable error on the relevant // unstable partitions (UNSTABLE_OFFSET_COMMIT). See KIP-447 for more // details. RequireStable bool // v7+ }
OffsetFetchRequest requests the most recent committed offsets for topic partitions in a group.
func NewOffsetFetchRequest ¶
func NewOffsetFetchRequest() OffsetFetchRequest
NewOffsetFetchRequest returns a default OffsetFetchRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrOffsetFetchRequest ¶
func NewPtrOffsetFetchRequest() *OffsetFetchRequest
NewPtrOffsetFetchRequest returns a pointer to a default OffsetFetchRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*OffsetFetchRequest) AppendTo ¶
func (v *OffsetFetchRequest) AppendTo(dst []byte) []byte
func (*OffsetFetchRequest) Default ¶
func (v *OffsetFetchRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetFetchRequest.
func (*OffsetFetchRequest) GetVersion ¶
func (v *OffsetFetchRequest) GetVersion() int16
func (*OffsetFetchRequest) IsFlexible ¶
func (v *OffsetFetchRequest) IsFlexible() bool
func (*OffsetFetchRequest) IsGroupCoordinatorRequest ¶
func (v *OffsetFetchRequest) IsGroupCoordinatorRequest()
func (*OffsetFetchRequest) Key ¶
func (*OffsetFetchRequest) Key() int16
func (*OffsetFetchRequest) MaxVersion ¶
func (*OffsetFetchRequest) MaxVersion() int16
func (*OffsetFetchRequest) ReadFrom ¶
func (v *OffsetFetchRequest) ReadFrom(src []byte) error
func (*OffsetFetchRequest) RequestWith ¶
func (v *OffsetFetchRequest) RequestWith(ctx context.Context, r Requestor) (*OffsetFetchResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*OffsetFetchRequest) ResponseKind ¶
func (v *OffsetFetchRequest) ResponseKind() Response
func (*OffsetFetchRequest) SetVersion ¶
func (v *OffsetFetchRequest) SetVersion(version int16)
type OffsetFetchRequestTopic ¶
type OffsetFetchRequestTopic struct { // Topic is a topic to fetch offsets for. Topic string // Partitions in a list of partitions in a group to fetch offsets for. Partitions []int32 }
func NewOffsetFetchRequestTopic ¶
func NewOffsetFetchRequestTopic() OffsetFetchRequestTopic
NewOffsetFetchRequestTopic returns a default OffsetFetchRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetFetchRequestTopic) Default ¶
func (v *OffsetFetchRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetFetchRequestTopic.
type OffsetFetchResponse ¶
type OffsetFetchResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 4. ThrottleMillis int32 // v3+ // Topics contains responses for each requested topic/partition. Topics []OffsetFetchResponseTopic // ErrorCode is a top level error code that applies to all topic/partitions. // This will be any group error. ErrorCode int16 // v2+ }
OffsetFetchResponse is returned from an OffsetFetchRequest.
func NewOffsetFetchResponse ¶
func NewOffsetFetchResponse() OffsetFetchResponse
NewOffsetFetchResponse returns a default OffsetFetchResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrOffsetFetchResponse ¶
func NewPtrOffsetFetchResponse() *OffsetFetchResponse
NewPtrOffsetFetchResponse returns a pointer to a default OffsetFetchResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*OffsetFetchResponse) AppendTo ¶
func (v *OffsetFetchResponse) AppendTo(dst []byte) []byte
func (*OffsetFetchResponse) Default ¶
func (v *OffsetFetchResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetFetchResponse.
func (*OffsetFetchResponse) GetVersion ¶
func (v *OffsetFetchResponse) GetVersion() int16
func (*OffsetFetchResponse) IsFlexible ¶
func (v *OffsetFetchResponse) IsFlexible() bool
func (*OffsetFetchResponse) Key ¶
func (*OffsetFetchResponse) Key() int16
func (*OffsetFetchResponse) MaxVersion ¶
func (*OffsetFetchResponse) MaxVersion() int16
func (*OffsetFetchResponse) ReadFrom ¶
func (v *OffsetFetchResponse) ReadFrom(src []byte) error
func (*OffsetFetchResponse) RequestKind ¶
func (v *OffsetFetchResponse) RequestKind() Request
func (*OffsetFetchResponse) SetVersion ¶
func (v *OffsetFetchResponse) SetVersion(version int16)
func (*OffsetFetchResponse) Throttle ¶ added in v0.6.2
func (v *OffsetFetchResponse) Throttle() (int32, bool)
type OffsetFetchResponseTopic ¶
type OffsetFetchResponseTopic struct { // Topic is the topic this offset fetch response corresponds to. Topic string // Partitions contains responses for each requested partition in // a topic. Partitions []OffsetFetchResponseTopicPartition }
func NewOffsetFetchResponseTopic ¶
func NewOffsetFetchResponseTopic() OffsetFetchResponseTopic
NewOffsetFetchResponseTopic returns a default OffsetFetchResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetFetchResponseTopic) Default ¶
func (v *OffsetFetchResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetFetchResponseTopic.
type OffsetFetchResponseTopicPartition ¶
type OffsetFetchResponseTopicPartition struct { // Partition is the partition in a topic this array slot corresponds to. Partition int32 // Offset is the most recently committed offset for this topic partition // in a group. Offset int64 // LeaderEpoch is the leader epoch of the last consumed record. // // This was proposed in KIP-320 and introduced in Kafka 2.1.0 and allows // clients to detect log truncation. See the KIP for more details. LeaderEpoch int32 // v5+ // Metadata is client provided metadata corresponding to the offset commit. // This can be useful for adding who made the commit, etc. Metadata *string // ErrorCode is the error for this partition response. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to the group. // // INVALID_GROUP_ID is returned in the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available // (due to the requested broker shutting down or it has not completed startup). // // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is loading. // // NOT_COORDINATOR is returned if the requested broker is not the coordinator // for the requested group. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the requested topic or partition // is unknown. // // UNSTABLE_OFFSET_COMMIT is returned for v7+ if the request set RequireStable. // See KIP-447 for more details. ErrorCode int16 }
func NewOffsetFetchResponseTopicPartition ¶
func NewOffsetFetchResponseTopicPartition() OffsetFetchResponseTopicPartition
NewOffsetFetchResponseTopicPartition returns a default OffsetFetchResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetFetchResponseTopicPartition) Default ¶
func (v *OffsetFetchResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetFetchResponseTopicPartition.
type OffsetForLeaderEpochRequest ¶
type OffsetForLeaderEpochRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // ReplicaID, added in support of KIP-392, is the broker ID of the follower, // or -1 if this request is from a consumer. ReplicaID int32 // v3+ // Topics are topics to fetch leader epoch offsets for. Topics []OffsetForLeaderEpochRequestTopic }
OffsetForLeaderEpochRequest requests log end offsets for partitions.
Version 2, proposed in KIP-320 and introduced in Kafka 2.1.0, can be used by consumers to perform more accurate offset resetting in the case of data loss.
In support of version 2, this requires DESCRIBE on TOPIC.
func NewOffsetForLeaderEpochRequest ¶
func NewOffsetForLeaderEpochRequest() OffsetForLeaderEpochRequest
NewOffsetForLeaderEpochRequest returns a default OffsetForLeaderEpochRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrOffsetForLeaderEpochRequest ¶
func NewPtrOffsetForLeaderEpochRequest() *OffsetForLeaderEpochRequest
NewPtrOffsetForLeaderEpochRequest returns a pointer to a default OffsetForLeaderEpochRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*OffsetForLeaderEpochRequest) AppendTo ¶
func (v *OffsetForLeaderEpochRequest) AppendTo(dst []byte) []byte
func (*OffsetForLeaderEpochRequest) Default ¶
func (v *OffsetForLeaderEpochRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetForLeaderEpochRequest.
func (*OffsetForLeaderEpochRequest) GetVersion ¶
func (v *OffsetForLeaderEpochRequest) GetVersion() int16
func (*OffsetForLeaderEpochRequest) IsFlexible ¶
func (v *OffsetForLeaderEpochRequest) IsFlexible() bool
func (*OffsetForLeaderEpochRequest) Key ¶
func (*OffsetForLeaderEpochRequest) Key() int16
func (*OffsetForLeaderEpochRequest) MaxVersion ¶
func (*OffsetForLeaderEpochRequest) MaxVersion() int16
func (*OffsetForLeaderEpochRequest) ReadFrom ¶
func (v *OffsetForLeaderEpochRequest) ReadFrom(src []byte) error
func (*OffsetForLeaderEpochRequest) RequestWith ¶
func (v *OffsetForLeaderEpochRequest) RequestWith(ctx context.Context, r Requestor) (*OffsetForLeaderEpochResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*OffsetForLeaderEpochRequest) ResponseKind ¶
func (v *OffsetForLeaderEpochRequest) ResponseKind() Response
func (*OffsetForLeaderEpochRequest) SetVersion ¶
func (v *OffsetForLeaderEpochRequest) SetVersion(version int16)
type OffsetForLeaderEpochRequestTopic ¶
type OffsetForLeaderEpochRequestTopic struct { // Topic is the name of a topic. Topic string // Partitions are partitions within a topic to fetch leader epoch offsets for. Partitions []OffsetForLeaderEpochRequestTopicPartition }
func NewOffsetForLeaderEpochRequestTopic ¶
func NewOffsetForLeaderEpochRequestTopic() OffsetForLeaderEpochRequestTopic
NewOffsetForLeaderEpochRequestTopic returns a default OffsetForLeaderEpochRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetForLeaderEpochRequestTopic) Default ¶
func (v *OffsetForLeaderEpochRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetForLeaderEpochRequestTopic.
type OffsetForLeaderEpochRequestTopicPartition ¶
type OffsetForLeaderEpochRequestTopicPartition struct { // Partition is the number of a partition. Partition int32 // CurrentLeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0, // allows brokers to check if the client is fenced (has an out of date // leader) or if the client is ahead of the broker. // // The initial leader epoch can be determined from a MetadataResponse. CurrentLeaderEpoch int32 // v2+ // LeaderEpoch is the epoch to fetch the end offset for. LeaderEpoch int32 }
func NewOffsetForLeaderEpochRequestTopicPartition ¶
func NewOffsetForLeaderEpochRequestTopicPartition() OffsetForLeaderEpochRequestTopicPartition
NewOffsetForLeaderEpochRequestTopicPartition returns a default OffsetForLeaderEpochRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetForLeaderEpochRequestTopicPartition) Default ¶
func (v *OffsetForLeaderEpochRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetForLeaderEpochRequestTopicPartition.
type OffsetForLeaderEpochResponse ¶
type OffsetForLeaderEpochResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // v2+ // Topics are responses to topics in the request. Topics []OffsetForLeaderEpochResponseTopic }
OffsetForLeaderEpochResponse is returned from an OffsetForLeaderEpochRequest.
func NewOffsetForLeaderEpochResponse ¶
func NewOffsetForLeaderEpochResponse() OffsetForLeaderEpochResponse
NewOffsetForLeaderEpochResponse returns a default OffsetForLeaderEpochResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrOffsetForLeaderEpochResponse ¶
func NewPtrOffsetForLeaderEpochResponse() *OffsetForLeaderEpochResponse
NewPtrOffsetForLeaderEpochResponse returns a pointer to a default OffsetForLeaderEpochResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*OffsetForLeaderEpochResponse) AppendTo ¶
func (v *OffsetForLeaderEpochResponse) AppendTo(dst []byte) []byte
func (*OffsetForLeaderEpochResponse) Default ¶
func (v *OffsetForLeaderEpochResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetForLeaderEpochResponse.
func (*OffsetForLeaderEpochResponse) GetVersion ¶
func (v *OffsetForLeaderEpochResponse) GetVersion() int16
func (*OffsetForLeaderEpochResponse) IsFlexible ¶
func (v *OffsetForLeaderEpochResponse) IsFlexible() bool
func (*OffsetForLeaderEpochResponse) Key ¶
func (*OffsetForLeaderEpochResponse) Key() int16
func (*OffsetForLeaderEpochResponse) MaxVersion ¶
func (*OffsetForLeaderEpochResponse) MaxVersion() int16
func (*OffsetForLeaderEpochResponse) ReadFrom ¶
func (v *OffsetForLeaderEpochResponse) ReadFrom(src []byte) error
func (*OffsetForLeaderEpochResponse) RequestKind ¶
func (v *OffsetForLeaderEpochResponse) RequestKind() Request
func (*OffsetForLeaderEpochResponse) SetVersion ¶
func (v *OffsetForLeaderEpochResponse) SetVersion(version int16)
func (*OffsetForLeaderEpochResponse) Throttle ¶ added in v0.6.2
func (v *OffsetForLeaderEpochResponse) Throttle() (int32, bool)
type OffsetForLeaderEpochResponseTopic ¶
type OffsetForLeaderEpochResponseTopic struct { // Topic is the topic this response corresponds to. Topic string // Partitions are responses to partitions in a topic in the request. Partitions []OffsetForLeaderEpochResponseTopicPartition }
func NewOffsetForLeaderEpochResponseTopic ¶
func NewOffsetForLeaderEpochResponseTopic() OffsetForLeaderEpochResponseTopic
NewOffsetForLeaderEpochResponseTopic returns a default OffsetForLeaderEpochResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetForLeaderEpochResponseTopic) Default ¶
func (v *OffsetForLeaderEpochResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetForLeaderEpochResponseTopic.
type OffsetForLeaderEpochResponseTopicPartition ¶
type OffsetForLeaderEpochResponseTopicPartition struct { // ErrorCode is the error code returned on request failure. // // TOPIC_AUTHORIZATION_FAILED is returned if the client does not have // the necessary permissions to issue this request. // // KAFKA_STORAGE_ERROR is returned if the partition is offline. // // NOT_LEADER_FOR_PARTITION is returned if the broker knows of the partition // but does not own it. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of the // partition. // // FENCED_LEADER_EPOCH is returned if the client is using a current leader epoch // older than the actual leader epoch. // // UNKNOWN_LEADER_EPOCH if returned if the client is using a current leader epoch // that the actual leader does not know of. This could occur when the client // has newer metadata than the broker when the broker just became the leader for // a replica. ErrorCode int16 // Partition is the partition this response is for. Partition int32 // LeaderEpoch is similar to the requested leader epoch, but pairs with the // next field. If the requested leader epoch is unknown, this is -1. If the // requested epoch had no records produced during the requested epoch, this // is the first prior epoch that had records. LeaderEpoch int32 // EndOffset is either (1) just past the last recorded offset in the // current partition if the broker leader has the same epoch as the // leader epoch in the request, or (2) the beginning offset of the next // epoch if the leader is past the requested epoch. The second scenario // can be seen as equivalent to the first: the beginning offset of the // next epoch is just past the final offset of the prior epoch. // // (2) allows consumers to detect data loss: if the consumer consumed // past the end offset that is returned, then the consumer should reset // to the returned offset and the consumer knows everything past the end // offset was lost. // // With the prior field, consumers know that at this offset, the broker // either has no more records (consumer is caught up), or the broker // transitioned to a new epoch. EndOffset int64 }
func NewOffsetForLeaderEpochResponseTopicPartition ¶
func NewOffsetForLeaderEpochResponseTopicPartition() OffsetForLeaderEpochResponseTopicPartition
NewOffsetForLeaderEpochResponseTopicPartition returns a default OffsetForLeaderEpochResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*OffsetForLeaderEpochResponseTopicPartition) Default ¶
func (v *OffsetForLeaderEpochResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to OffsetForLeaderEpochResponseTopicPartition.
type ProduceRequest ¶
type ProduceRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TransactionID is the transaction ID to use for this request, allowing for // exactly once semantics. TransactionID *string // v3+ // Acks specifies the number of acks that the partition leaders must receive // from in sync replicas before considering a record batch fully written. // // Valid values are -1, 0, or 1 corresponding to all, none, or the leader only. // // Note that if no acks are requested, Kafka will close the connection // if any topic or partition errors to trigger a client metadata refresh. Acks int16 // TimeoutMillis is the millisecond timeout of this request. TimeoutMillis int32 // Topics is an array of topics to send record batches to. Topics []ProduceRequestTopic }
ProduceRequest issues records to be created to Kafka.
Kafka 0.10.0 (v2) changed Records from MessageSet v0 to MessageSet v1. Kafka 0.11.0 (v3) again changed Records to RecordBatch.
Note that the special client ID "__admin_client" will allow you to produce records to internal topics. This is generally recommended if you want to break your Kafka cluster.
func NewProduceRequest ¶
func NewProduceRequest() ProduceRequest
NewProduceRequest returns a default ProduceRequest This is a shortcut for creating a struct and calling Default yourself.
func NewPtrProduceRequest ¶
func NewPtrProduceRequest() *ProduceRequest
NewPtrProduceRequest returns a pointer to a default ProduceRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ProduceRequest) AppendTo ¶
func (v *ProduceRequest) AppendTo(dst []byte) []byte
func (*ProduceRequest) Default ¶
func (v *ProduceRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ProduceRequest.
func (*ProduceRequest) GetVersion ¶
func (v *ProduceRequest) GetVersion() int16
func (*ProduceRequest) IsFlexible ¶
func (v *ProduceRequest) IsFlexible() bool
func (*ProduceRequest) Key ¶
func (*ProduceRequest) Key() int16
func (*ProduceRequest) MaxVersion ¶
func (*ProduceRequest) MaxVersion() int16
func (*ProduceRequest) ReadFrom ¶
func (v *ProduceRequest) ReadFrom(src []byte) error
func (*ProduceRequest) RequestWith ¶
func (v *ProduceRequest) RequestWith(ctx context.Context, r Requestor) (*ProduceResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*ProduceRequest) ResponseKind ¶
func (v *ProduceRequest) ResponseKind() Response
func (*ProduceRequest) SetVersion ¶
func (v *ProduceRequest) SetVersion(version int16)
type ProduceRequestTopic ¶
type ProduceRequestTopic struct { // Topic is a topic to send record batches to. Topic string // Partitions is an array of partitions to send record batches to. Partitions []ProduceRequestTopicPartition }
func NewProduceRequestTopic ¶
func NewProduceRequestTopic() ProduceRequestTopic
NewProduceRequestTopic returns a default ProduceRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*ProduceRequestTopic) Default ¶
func (v *ProduceRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ProduceRequestTopic.
type ProduceRequestTopicPartition ¶
type ProduceRequestTopicPartition struct { // Partition is a partition to send a record batch to. Partition int32 // Records is a batch of records to write to a topic's partition. // // For Kafka pre 0.11.0, the contents of the byte array is a serialized // message set. At or after 0.11.0, the contents of the byte array is a // serialized RecordBatch. Records []byte }
func NewProduceRequestTopicPartition ¶
func NewProduceRequestTopicPartition() ProduceRequestTopicPartition
NewProduceRequestTopicPartition returns a default ProduceRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*ProduceRequestTopicPartition) Default ¶
func (v *ProduceRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ProduceRequestTopicPartition.
type ProduceResponse ¶
type ProduceResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // Topics is an array of responses for the topic's that batches were sent // to. Topics []ProduceResponseTopic // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 6. ThrottleMillis int32 // v1+ }
ProduceResponse is returned from a ProduceRequest.
func NewProduceResponse ¶
func NewProduceResponse() ProduceResponse
NewProduceResponse returns a default ProduceResponse This is a shortcut for creating a struct and calling Default yourself.
func NewPtrProduceResponse ¶
func NewPtrProduceResponse() *ProduceResponse
NewPtrProduceResponse returns a pointer to a default ProduceResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func (*ProduceResponse) AppendTo ¶
func (v *ProduceResponse) AppendTo(dst []byte) []byte
func (*ProduceResponse) Default ¶
func (v *ProduceResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ProduceResponse.
func (*ProduceResponse) GetVersion ¶
func (v *ProduceResponse) GetVersion() int16
func (*ProduceResponse) IsFlexible ¶
func (v *ProduceResponse) IsFlexible() bool
func (*ProduceResponse) Key ¶
func (*ProduceResponse) Key() int16
func (*ProduceResponse) MaxVersion ¶
func (*ProduceResponse) MaxVersion() int16
func (*ProduceResponse) ReadFrom ¶
func (v *ProduceResponse) ReadFrom(src []byte) error
func (*ProduceResponse) RequestKind ¶
func (v *ProduceResponse) RequestKind() Request
func (*ProduceResponse) SetVersion ¶
func (v *ProduceResponse) SetVersion(version int16)
func (*ProduceResponse) Throttle ¶ added in v0.6.2
func (v *ProduceResponse) Throttle() (int32, bool)
type ProduceResponseTopic ¶
type ProduceResponseTopic struct { // Topic is the topic this response pertains to. Topic string // Partitions is an array of responses for the partition's that // batches were sent to. Partitions []ProduceResponseTopicPartition }
func NewProduceResponseTopic ¶
func NewProduceResponseTopic() ProduceResponseTopic
NewProduceResponseTopic returns a default ProduceResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*ProduceResponseTopic) Default ¶
func (v *ProduceResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ProduceResponseTopic.
type ProduceResponseTopicPartition ¶
type ProduceResponseTopicPartition struct { // Partition is the partition this response pertains to. Partition int32 // ErrorCode is any error for a topic/partition in the request. // There are many error codes for produce requests. // // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned for all topics and // partitions if the request had a transactional ID but the client // is not authorized for transactions. // // CLUSTER_AUTHORIZATION_FAILED is returned for all topics and partitions // if the request was idempotent but the client is not authorized // for idempotent requests. // // TOPIC_AUTHORIZATION_FAILED is returned for all topics the client // is not authorized to talk to. // // INVALID_REQUIRED_ACKS is returned if the request contained an invalid // number for "acks". // // CORRUPT_MESSAGE is returned for many reasons, generally related to // problems with messages (invalid magic, size mismatch, etc.). // // MESSAGE_TOO_LARGE is returned if a record batch is larger than the // broker's configured max.message.size. // // RECORD_LIST_TOO_LARGE is returned if the record batch is larger than // the broker's segment.bytes. // // INVALID_TIMESTAMP is returned if the record batch uses LogAppendTime // or if the timestamp delta from when the broker receives the message // is more than the broker's log.message.timestamp.difference.max.ms. // // UNSUPPORTED_FOR_MESSAGE_FORMAT is returned if using a Kafka v2 message // format (i.e. RecordBatch) feature (idempotence) while sending v1 // messages (i.e. a MessageSet). // // KAFKA_STORAGE_ERROR is returned if the log directory for a partition // is offline. // // NOT_ENOUGH_REPLICAS is returned if all acks are required, but there // are not enough in sync replicas yet. // // NOT_ENOUGH_REPLICAS_AFTER_APPEND is returned on old Kafka versions // (pre 0.11.0.0) when a message was written to disk and then Kafka // noticed not enough replicas existed to replicate the message. // // DUPLICATE_SEQUENCE_NUMBER is returned for Kafka <1.1.0 when a // sequence number is detected as a duplicate. After, out of order // is returned. // // UNKNOWN_TOPIC_OR_PARTITION is returned if the topic or partition // is unknown. // // NOT_LEADER_FOR_PARTITION is returned if the broker is not a leader // for this partition. This means that the client has stale metadata. // // INVALID_PRODUCER_EPOCH is returned if the produce request was // attempted with an old epoch. Either there is a newer producer using // the same transaction ID, or the transaction ID used has expired. // // UNKNOWN_PRODUCER_ID, added in Kafka 1.0.0 (message format v5+) is // returned if the producer used an ID that Kafka does not know about or // if the request has a larger sequence number than Kafka expects. The // LogStartOffset must be checked in this case. If the offset is greater // than the last acknowledged offset, then no data loss has occurred; the // client just sent data so long ago that Kafka rotated the partition out // of existence and no longer knows of this producer ID. In this case, // reset your sequence numbers to 0. If the log start offset is equal to // or less than what the client sent prior, then data loss has occurred. // See KAFKA-5793 for more details. NOTE: Unfortunately, even UNKNOWN_PRODUCER_ID // is unsafe to handle, so this error should likely be treated the same // as OUT_OF_ORDER_SEQUENCE_NUMER. See KIP-360 for more details. // // OUT_OF_ORDER_SEQUENCE_NUMBER is sent if the batch's FirstSequence was // not what it should be (the last FirstSequence, plus the number of // records in the last batch, plus one). After 1.0.0, this generally // means data loss. Before, there could be confusion on if the broker // actually rotated the partition out of existence (this is why // UNKNOWN_PRODUCER_ID was introduced). ErrorCode int16 // BaseOffset is the offset that the records in the produce request began // at in the partition. BaseOffset int64 // LogAppendTime is the millisecond that records were appended to the // partition inside Kafka. This is only not -1 if records were written // with the log append time flag (which producers cannot do). LogAppendTime int64 // v2+ // LogStartOffset, introduced in Kafka 1.0.0, can be used to see if an // UNKNOWN_PRODUCER_ID means Kafka rotated records containing the used // producer ID out of existence, or if Kafka lost data. LogStartOffset int64 // v5+ // ErrorRecords are indices of individual records that caused a batch // to error. This was added for KIP-467. ErrorRecords []ProduceResponseTopicPartitionErrorRecord // v8+ // ErrorMessage is the global error message of of what caused this batch // to error. ErrorMessage *string // v8+ }
func NewProduceResponseTopicPartition ¶
func NewProduceResponseTopicPartition() ProduceResponseTopicPartition
NewProduceResponseTopicPartition returns a default ProduceResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*ProduceResponseTopicPartition) Default ¶
func (v *ProduceResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ProduceResponseTopicPartition.
type ProduceResponseTopicPartitionErrorRecord ¶
type ProduceResponseTopicPartitionErrorRecord struct { // RelativeOffset is the offset of the record that caused problems. RelativeOffset int32 // ErrorMessage is the error of this record. ErrorMessage *string }
func NewProduceResponseTopicPartitionErrorRecord ¶
func NewProduceResponseTopicPartitionErrorRecord() ProduceResponseTopicPartitionErrorRecord
NewProduceResponseTopicPartitionErrorRecord returns a default ProduceResponseTopicPartitionErrorRecord This is a shortcut for creating a struct and calling Default yourself.
func (*ProduceResponseTopicPartitionErrorRecord) Default ¶
func (v *ProduceResponseTopicPartitionErrorRecord) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to ProduceResponseTopicPartitionErrorRecord.
type Record ¶
type Record struct { // Length is the length of this record on the wire of everything that // follows this field. It is an int32 encoded as a varint. Length int32 // Attributes are record level attributes. This field currently is unused. Attributes int8 // TimestampDelta is the millisecond delta of this record's timestamp // from the record's RecordBatch's FirstTimestamp. TimestampDelta int32 // OffsetDelta is the delta of this record's offset from the record's // RecordBatch's FirstOffset. // // For producing, this is usually equal to the index of the record in // the record batch. OffsetDelta int32 // Key is an blob of data for a record. // // Key's are usually used for hashing the record to specific Kafka partitions. Key []byte // Value is a blob of data. This field is the main "message" portion of a // record. Value []byte // Headers are optional user provided metadata for records. Unlike normal // arrays, the number of headers is encoded as a varint. Headers []Header }
A Record is a Kafka v0.11.0.0 record. It corresponds to an individual message as it is written on the wire.
func NewRecord ¶
func NewRecord() Record
NewRecord returns a default Record This is a shortcut for creating a struct and calling Default yourself.
type RecordBatch ¶
type RecordBatch struct { // FirstOffset is the first offset in a record batch. // // For producing, this is usually 0. FirstOffset int64 // Length is the wire length of everything that follows this field. Length int32 // PartitionLeaderEpoch is the leader epoch of the broker at the time // this batch was written. Kafka uses this for cluster communication, // but clients can also use this to better aid truncation detection. // See KIP-320. Producers should set this to -1. PartitionLeaderEpoch int32 // Magic is the current "magic" number of this message format. // The current magic number is 2. Magic int8 // CRC is the crc of everything that follows this field using the // Castagnoli polynomial. CRC int32 // Attributes describe the records array of this batch. // // Bits 0 thru 3 correspond to compression: // - 000 is no compression // - 001 is gzip compression // - 010 is snappy compression // - 011 is lz4 compression // - 100 is zstd compression (produce request version 7+) // // Bit 4 is the timestamp type, with 0 meaning CreateTime corresponding // to the timestamp being from the producer, and 1 meaning LogAppendTime // corresponding to the timestamp being from the broker. // Setting this to LogAppendTime will cause batches to be rejected. // // Bit 5 indicates whether the batch is part of a transaction (1 is yes). // // Bit 6 indicates if the batch includes a control message (1 is yes). // Control messages are used to enable transactions and are generated from // the broker. Clients should not return control batches to applications. Attributes int16 // LastOffsetDelta is the offset of the last message in a batch. This is used // by the broker to ensure correct behavior even with batch compaction. LastOffsetDelta int32 // FirstTimestamp is the timestamp (in milliseconds) of the first record // in a batch. FirstTimestamp int64 // MaxTimestamp is the timestamp (in milliseconds) of the last record // in a batch. Similar to LastOffsetDelta, this is used to ensure correct // behavior with compacting. MaxTimestamp int64 // ProducerID is the broker assigned producerID from an InitProducerID // request. // // Clients that wish to support idempotent messages and transactions must // set this field. // // Note that when not using transactions, any producer here is always // accepted (and the epoch is always zero). Outside transactions, the ID // is used only to deduplicate requests (and there must be at max 5 // concurrent requests). ProducerID int64 // ProducerEpoch is the broker assigned producerEpoch from an InitProducerID // request. // // Clients that wish to support idempotent messages and transactions must // set this field. ProducerEpoch int16 // FirstSequence is the producer assigned sequence number used by the // broker to deduplicate messages. // // Clients that wish to support idempotent messages and transactions must // set this field. // // The sequence number for each record in a batch is OffsetDelta + FirstSequence. FirstSequence int32 // NumRecords is the number of records in the array below. // // This is separate from Records due to the potential for records to be // compressed. NumRecords int32 // Records contains records, either compressed or uncompressed. // // For uncompressed records, this is an array of records ([Record]). // // For compressed records, the length of the uncompressed array is kept // but everything that follows is compressed. // // The number of bytes is expected to be the Length field minus 49. Records []byte }
RecordBatch is a Kafka concept that groups many individual records together in a more optimized format.
func NewRecordBatch ¶
func NewRecordBatch() RecordBatch
NewRecordBatch returns a default RecordBatch This is a shortcut for creating a struct and calling Default yourself.
func (*RecordBatch) AppendTo ¶
func (v *RecordBatch) AppendTo(dst []byte) []byte
func (*RecordBatch) Default ¶
func (v *RecordBatch) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to RecordBatch.
func (*RecordBatch) ReadFrom ¶
func (v *RecordBatch) ReadFrom(src []byte) error
type RenewDelegationTokenRequest ¶
type RenewDelegationTokenRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // HMAC is the HMAC of the token to be renewed. HMAC []byte // RenewTimeMillis is how long to renew the token for. If -1, Kafka uses its // delegation.token.max.lifetime.ms. RenewTimeMillis int64 }
RenewDelegationTokenRequest is a request to renew a delegation token that has not yet hit its max timestamp. Note that a client using a token cannot renew its own token.
func NewPtrRenewDelegationTokenRequest ¶
func NewPtrRenewDelegationTokenRequest() *RenewDelegationTokenRequest
NewPtrRenewDelegationTokenRequest returns a pointer to a default RenewDelegationTokenRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewRenewDelegationTokenRequest ¶
func NewRenewDelegationTokenRequest() RenewDelegationTokenRequest
NewRenewDelegationTokenRequest returns a default RenewDelegationTokenRequest This is a shortcut for creating a struct and calling Default yourself.
func (*RenewDelegationTokenRequest) AppendTo ¶
func (v *RenewDelegationTokenRequest) AppendTo(dst []byte) []byte
func (*RenewDelegationTokenRequest) Default ¶
func (v *RenewDelegationTokenRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to RenewDelegationTokenRequest.
func (*RenewDelegationTokenRequest) GetVersion ¶
func (v *RenewDelegationTokenRequest) GetVersion() int16
func (*RenewDelegationTokenRequest) IsFlexible ¶
func (v *RenewDelegationTokenRequest) IsFlexible() bool
func (*RenewDelegationTokenRequest) Key ¶
func (*RenewDelegationTokenRequest) Key() int16
func (*RenewDelegationTokenRequest) MaxVersion ¶
func (*RenewDelegationTokenRequest) MaxVersion() int16
func (*RenewDelegationTokenRequest) ReadFrom ¶
func (v *RenewDelegationTokenRequest) ReadFrom(src []byte) error
func (*RenewDelegationTokenRequest) RequestWith ¶
func (v *RenewDelegationTokenRequest) RequestWith(ctx context.Context, r Requestor) (*RenewDelegationTokenResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*RenewDelegationTokenRequest) ResponseKind ¶
func (v *RenewDelegationTokenRequest) ResponseKind() Response
func (*RenewDelegationTokenRequest) SetVersion ¶
func (v *RenewDelegationTokenRequest) SetVersion(version int16)
type RenewDelegationTokenResponse ¶
type RenewDelegationTokenResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ErrorCode is any error that caused the request to fail. ErrorCode int16 // ExpiryTimestamp is the millisecond timestamp this token will expire. The // token can be renewed up to MaxTimestamp, past which point, it will be // invalid. The Kafka default is 24h. ExpiryTimestamp int64 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 }
RenewDelegationTokenResponse is a response to a RenewDelegationTokenRequest.
func NewPtrRenewDelegationTokenResponse ¶
func NewPtrRenewDelegationTokenResponse() *RenewDelegationTokenResponse
NewPtrRenewDelegationTokenResponse returns a pointer to a default RenewDelegationTokenResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewRenewDelegationTokenResponse ¶
func NewRenewDelegationTokenResponse() RenewDelegationTokenResponse
NewRenewDelegationTokenResponse returns a default RenewDelegationTokenResponse This is a shortcut for creating a struct and calling Default yourself.
func (*RenewDelegationTokenResponse) AppendTo ¶
func (v *RenewDelegationTokenResponse) AppendTo(dst []byte) []byte
func (*RenewDelegationTokenResponse) Default ¶
func (v *RenewDelegationTokenResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to RenewDelegationTokenResponse.
func (*RenewDelegationTokenResponse) GetVersion ¶
func (v *RenewDelegationTokenResponse) GetVersion() int16
func (*RenewDelegationTokenResponse) IsFlexible ¶
func (v *RenewDelegationTokenResponse) IsFlexible() bool
func (*RenewDelegationTokenResponse) Key ¶
func (*RenewDelegationTokenResponse) Key() int16
func (*RenewDelegationTokenResponse) MaxVersion ¶
func (*RenewDelegationTokenResponse) MaxVersion() int16
func (*RenewDelegationTokenResponse) ReadFrom ¶
func (v *RenewDelegationTokenResponse) ReadFrom(src []byte) error
func (*RenewDelegationTokenResponse) RequestKind ¶
func (v *RenewDelegationTokenResponse) RequestKind() Request
func (*RenewDelegationTokenResponse) SetVersion ¶
func (v *RenewDelegationTokenResponse) SetVersion(version int16)
func (*RenewDelegationTokenResponse) Throttle ¶ added in v0.6.2
func (v *RenewDelegationTokenResponse) Throttle() (int32, bool)
type Request ¶
type Request interface { // Key returns the protocol key for this message kind. Key() int16 // MaxVersion returns the maximum protocol version this message // supports. // // This function allows one to implement a client that chooses message // versions based off of the max of a message's max version in the // client and the broker's max supported version. MaxVersion() int16 // SetVersion sets the version to use for this request and response. SetVersion(int16) // GetVersion returns the version currently set to use for the request // and response. GetVersion() int16 // IsFlexible returns whether the request at its current version is // "flexible" as per the KIP-482. IsFlexible() bool // AppendTo appends this message in wire protocol form to a slice and // returns the slice. AppendTo([]byte) []byte // ReadFrom parses all of the input slice into the response type. // // This should return an error if too little data is input. ReadFrom([]byte) error // ResponseKind returns an empty Response that is expected for // this message request. ResponseKind() Response }
Request represents a type that can be requested to Kafka.
func RequestForKey ¶
RequestForKey returns the request corresponding to the given request key or nil if the key is unknown.
type RequestFormatter ¶
type RequestFormatter struct {
// contains filtered or unexported fields
}
RequestFormatter formats requests.
The default empty struct works correctly, but can be extended with the NewRequestFormatter function.
func NewRequestFormatter ¶
func NewRequestFormatter(opts ...RequestFormatterOpt) *RequestFormatter
NewRequestFormatter returns a RequestFormatter with the opts applied.
func (*RequestFormatter) AppendRequest ¶
func (f *RequestFormatter) AppendRequest( dst []byte, r Request, correlationID int32, ) []byte
AppendRequest appends a full message request to dst, returning the updated slice. This message is the full body that needs to be written to issue a Kafka request.
type RequestFormatterOpt ¶
type RequestFormatterOpt interface {
// contains filtered or unexported methods
}
RequestFormatterOpt applys options to a RequestFormatter.
func FormatterClientID ¶
func FormatterClientID(id string) RequestFormatterOpt
FormatterClientID attaches the given client ID to any issued request, minus controlled shutdown v0, which uses its own special format.
type Requestor ¶
type Requestor interface { // Request issues a Request and returns either a Response or an error. Request(context.Context, Request) (Response, error) }
Requestor issues requests. Notably, the kgo.Client and kgo.Broker implements Requestor. All Requests in this package have a RequestWith function to have type-safe requests.
type Response ¶
type Response interface { // Key returns the protocol key for this message kind. Key() int16 // MaxVersion returns the maximum protocol version this message // supports. MaxVersion() int16 // SetVersion sets the version to use for this request and response. SetVersion(int16) // GetVersion returns the version currently set to use for the request // and response. GetVersion() int16 // IsFlexible returns whether the request at its current version is // "flexible" as per the KIP-482. IsFlexible() bool // AppendTo appends this message in wire protocol form to a slice and // returns the slice. AppendTo([]byte) []byte // ReadFrom parses all of the input slice into the response type. // // This should return an error if too little data is input. ReadFrom([]byte) error // RequestKind returns an empty Request that is expected for // this message request. RequestKind() Request }
Response represents a type that Kafka responds with.
func ResponseForKey ¶
ResponseForKey returns the response corresponding to the given request key or nil if the key is unknown.
type SASLAuthenticateRequest ¶
type SASLAuthenticateRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // SASLAuthBytes contains bytes for a SASL client request. SASLAuthBytes []byte }
SASLAuthenticate continues a sasl authentication flow. Prior to Kafka 1.0.0, authenticating with sasl involved sending raw blobs of data back and forth. After, those blobs are wrapped in a SASLAuthenticateRequest The benefit of this wrapping is that Kafka can indicate errors in the response, rather than just closing the connection. Additionally, the response allows for further extension fields.
func NewPtrSASLAuthenticateRequest ¶
func NewPtrSASLAuthenticateRequest() *SASLAuthenticateRequest
NewPtrSASLAuthenticateRequest returns a pointer to a default SASLAuthenticateRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewSASLAuthenticateRequest ¶
func NewSASLAuthenticateRequest() SASLAuthenticateRequest
NewSASLAuthenticateRequest returns a default SASLAuthenticateRequest This is a shortcut for creating a struct and calling Default yourself.
func (*SASLAuthenticateRequest) AppendTo ¶
func (v *SASLAuthenticateRequest) AppendTo(dst []byte) []byte
func (*SASLAuthenticateRequest) Default ¶
func (v *SASLAuthenticateRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to SASLAuthenticateRequest.
func (*SASLAuthenticateRequest) GetVersion ¶
func (v *SASLAuthenticateRequest) GetVersion() int16
func (*SASLAuthenticateRequest) IsFlexible ¶
func (v *SASLAuthenticateRequest) IsFlexible() bool
func (*SASLAuthenticateRequest) Key ¶
func (*SASLAuthenticateRequest) Key() int16
func (*SASLAuthenticateRequest) MaxVersion ¶
func (*SASLAuthenticateRequest) MaxVersion() int16
func (*SASLAuthenticateRequest) ReadFrom ¶
func (v *SASLAuthenticateRequest) ReadFrom(src []byte) error
func (*SASLAuthenticateRequest) RequestWith ¶
func (v *SASLAuthenticateRequest) RequestWith(ctx context.Context, r Requestor) (*SASLAuthenticateResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*SASLAuthenticateRequest) ResponseKind ¶
func (v *SASLAuthenticateRequest) ResponseKind() Response
func (*SASLAuthenticateRequest) SetVersion ¶
func (v *SASLAuthenticateRequest) SetVersion(version int16)
type SASLAuthenticateResponse ¶
type SASLAuthenticateResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ErrorCode is a potential error. ErrorCode int16 // ErrorMessage can contain a message for an error. ErrorMessage *string // SASLAuthBytes is the server challenge continuing SASL flow. SASLAuthBytes []byte // SessionLifetimeMillis, added in Kafka 2.2.0, is how long the SASL // authentication is valid for. This timeout is only enforced if the request // was v1. After this timeout, Kafka expects the next bytes on the wire to // begin reauthentication. Otherwise, Kafka closes the connection. SessionLifetimeMillis int64 // v1+ }
SASLAuthenticateResponse is returned for a SASLAuthenticateRequest.
func NewPtrSASLAuthenticateResponse ¶
func NewPtrSASLAuthenticateResponse() *SASLAuthenticateResponse
NewPtrSASLAuthenticateResponse returns a pointer to a default SASLAuthenticateResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewSASLAuthenticateResponse ¶
func NewSASLAuthenticateResponse() SASLAuthenticateResponse
NewSASLAuthenticateResponse returns a default SASLAuthenticateResponse This is a shortcut for creating a struct and calling Default yourself.
func (*SASLAuthenticateResponse) AppendTo ¶
func (v *SASLAuthenticateResponse) AppendTo(dst []byte) []byte
func (*SASLAuthenticateResponse) Default ¶
func (v *SASLAuthenticateResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to SASLAuthenticateResponse.
func (*SASLAuthenticateResponse) GetVersion ¶
func (v *SASLAuthenticateResponse) GetVersion() int16
func (*SASLAuthenticateResponse) IsFlexible ¶
func (v *SASLAuthenticateResponse) IsFlexible() bool
func (*SASLAuthenticateResponse) Key ¶
func (*SASLAuthenticateResponse) Key() int16
func (*SASLAuthenticateResponse) MaxVersion ¶
func (*SASLAuthenticateResponse) MaxVersion() int16
func (*SASLAuthenticateResponse) ReadFrom ¶
func (v *SASLAuthenticateResponse) ReadFrom(src []byte) error
func (*SASLAuthenticateResponse) RequestKind ¶
func (v *SASLAuthenticateResponse) RequestKind() Request
func (*SASLAuthenticateResponse) SetVersion ¶
func (v *SASLAuthenticateResponse) SetVersion(version int16)
type SASLHandshakeRequest ¶
type SASLHandshakeRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Mechanism is the mechanism to use for the sasl handshake (e.g., "PLAIN"). // // For version 0, if this mechanism is supported, it is expected that the // client immediately authenticates using this mechanism. Note that the // only mechanism exclusive to v0 is PLAIN. // // For version 1, if the mechanism is supported, the next request to issue // is SASLHandshakeRequest. Mechanism string }
SASLHandshakeRequest begins the sasl authentication flow. Note that Kerberos GSSAPI authentication has its own unique flow.
func NewPtrSASLHandshakeRequest ¶
func NewPtrSASLHandshakeRequest() *SASLHandshakeRequest
NewPtrSASLHandshakeRequest returns a pointer to a default SASLHandshakeRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewSASLHandshakeRequest ¶
func NewSASLHandshakeRequest() SASLHandshakeRequest
NewSASLHandshakeRequest returns a default SASLHandshakeRequest This is a shortcut for creating a struct and calling Default yourself.
func (*SASLHandshakeRequest) AppendTo ¶
func (v *SASLHandshakeRequest) AppendTo(dst []byte) []byte
func (*SASLHandshakeRequest) Default ¶
func (v *SASLHandshakeRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to SASLHandshakeRequest.
func (*SASLHandshakeRequest) GetVersion ¶
func (v *SASLHandshakeRequest) GetVersion() int16
func (*SASLHandshakeRequest) IsFlexible ¶
func (v *SASLHandshakeRequest) IsFlexible() bool
func (*SASLHandshakeRequest) Key ¶
func (*SASLHandshakeRequest) Key() int16
func (*SASLHandshakeRequest) MaxVersion ¶
func (*SASLHandshakeRequest) MaxVersion() int16
func (*SASLHandshakeRequest) ReadFrom ¶
func (v *SASLHandshakeRequest) ReadFrom(src []byte) error
func (*SASLHandshakeRequest) RequestWith ¶
func (v *SASLHandshakeRequest) RequestWith(ctx context.Context, r Requestor) (*SASLHandshakeResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*SASLHandshakeRequest) ResponseKind ¶
func (v *SASLHandshakeRequest) ResponseKind() Response
func (*SASLHandshakeRequest) SetVersion ¶
func (v *SASLHandshakeRequest) SetVersion(version int16)
type SASLHandshakeResponse ¶
type SASLHandshakeResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ErrorCode is non-zero for ILLEGAL_SASL_STATE, meaning a sasl handshake // is not expected at this point in the connection, or UNSUPPORTED_SASL_MECHANISM, // meaning the requested mechanism is not supported. ErrorCode int16 // SupportedMechanisms is the list of mechanisms supported if this request // errored. SupportedMechanisms []string }
SASLHandshakeResponse is returned for a SASLHandshakeRequest.
func NewPtrSASLHandshakeResponse ¶
func NewPtrSASLHandshakeResponse() *SASLHandshakeResponse
NewPtrSASLHandshakeResponse returns a pointer to a default SASLHandshakeResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewSASLHandshakeResponse ¶
func NewSASLHandshakeResponse() SASLHandshakeResponse
NewSASLHandshakeResponse returns a default SASLHandshakeResponse This is a shortcut for creating a struct and calling Default yourself.
func (*SASLHandshakeResponse) AppendTo ¶
func (v *SASLHandshakeResponse) AppendTo(dst []byte) []byte
func (*SASLHandshakeResponse) Default ¶
func (v *SASLHandshakeResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to SASLHandshakeResponse.
func (*SASLHandshakeResponse) GetVersion ¶
func (v *SASLHandshakeResponse) GetVersion() int16
func (*SASLHandshakeResponse) IsFlexible ¶
func (v *SASLHandshakeResponse) IsFlexible() bool
func (*SASLHandshakeResponse) Key ¶
func (*SASLHandshakeResponse) Key() int16
func (*SASLHandshakeResponse) MaxVersion ¶
func (*SASLHandshakeResponse) MaxVersion() int16
func (*SASLHandshakeResponse) ReadFrom ¶
func (v *SASLHandshakeResponse) ReadFrom(src []byte) error
func (*SASLHandshakeResponse) RequestKind ¶
func (v *SASLHandshakeResponse) RequestKind() Request
func (*SASLHandshakeResponse) SetVersion ¶
func (v *SASLHandshakeResponse) SetVersion(version int16)
type StickyMemberMetadata ¶
type StickyMemberMetadata struct { // CurrentAssignment is the assignment that a group member has when // issuing a join. CurrentAssignment []StickyMemberMetadataCurrentAssignment // Generation is the generation of this join. This is incremented every join. Generation int32 // v1+ }
StickyMemberMetadata is is what is encoded in UserData for GroupMemberMetadata in group join requests with the sticky partitioning strategy.
V1 added generation, which fixed a bug with flaky group members joining repeatedly. See KIP-341 for more details.
Note that clients should always try decoding as v1 and, if that fails, fall back to v0. This is necessary due to there being no version number anywhere in this type.
func NewStickyMemberMetadata ¶
func NewStickyMemberMetadata() StickyMemberMetadata
NewStickyMemberMetadata returns a default StickyMemberMetadata This is a shortcut for creating a struct and calling Default yourself.
func (*StickyMemberMetadata) AppendTo ¶
func (s *StickyMemberMetadata) AppendTo(dst []byte) []byte
AppendTo provides appending various versions of sticky member metadata to dst. If generation is not -1 (default for v0), this appends as version 1.
func (*StickyMemberMetadata) Default ¶
func (v *StickyMemberMetadata) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to StickyMemberMetadata.
func (*StickyMemberMetadata) ReadFrom ¶
func (s *StickyMemberMetadata) ReadFrom(src []byte) error
ReadFrom provides decoding various versions of sticky member metadata. A key point of this type is that it does not contain a version number inside it, but it is versioned: if decoding v1 fails, this falls back to v0.
type StickyMemberMetadataCurrentAssignment ¶
type StickyMemberMetadataCurrentAssignment struct { // Topic is a topic the group member is currently assigned. Topic string // Partitions are the partitions within a topic that a group member is // currently assigned. Partitions []int32 }
func NewStickyMemberMetadataCurrentAssignment ¶
func NewStickyMemberMetadataCurrentAssignment() StickyMemberMetadataCurrentAssignment
NewStickyMemberMetadataCurrentAssignment returns a default StickyMemberMetadataCurrentAssignment This is a shortcut for creating a struct and calling Default yourself.
func (*StickyMemberMetadataCurrentAssignment) Default ¶
func (v *StickyMemberMetadataCurrentAssignment) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to StickyMemberMetadataCurrentAssignment.
type StopReplicaRequest ¶
type StopReplicaRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 ControllerID int32 ControllerEpoch int32 BrokerEpoch int64 // v1+ DeletePartitions bool Topics []StopReplicaRequestTopic }
StopReplicaRequest is an advanced request that brokers use to stop replicas.
As this is an advanced request and there is little reason to issue it as a client, this request is undocumented.
Kafka 2.2.0 introduced version 1, proposed in KIP-380, which changed the layout of the struct to be more memory efficient.
Kafka 2.6.0 introduced version 3, proposed in KIP-570, reorganizes partitions to be stored and adds the leader epoch and delete partition fields per partition.
func NewPtrStopReplicaRequest ¶
func NewPtrStopReplicaRequest() *StopReplicaRequest
NewPtrStopReplicaRequest returns a pointer to a default StopReplicaRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewStopReplicaRequest ¶
func NewStopReplicaRequest() StopReplicaRequest
NewStopReplicaRequest returns a default StopReplicaRequest This is a shortcut for creating a struct and calling Default yourself.
func (*StopReplicaRequest) AppendTo ¶
func (v *StopReplicaRequest) AppendTo(dst []byte) []byte
func (*StopReplicaRequest) Default ¶
func (v *StopReplicaRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to StopReplicaRequest.
func (*StopReplicaRequest) GetVersion ¶
func (v *StopReplicaRequest) GetVersion() int16
func (*StopReplicaRequest) IsFlexible ¶
func (v *StopReplicaRequest) IsFlexible() bool
func (*StopReplicaRequest) Key ¶
func (*StopReplicaRequest) Key() int16
func (*StopReplicaRequest) MaxVersion ¶
func (*StopReplicaRequest) MaxVersion() int16
func (*StopReplicaRequest) ReadFrom ¶
func (v *StopReplicaRequest) ReadFrom(src []byte) error
func (*StopReplicaRequest) RequestWith ¶
func (v *StopReplicaRequest) RequestWith(ctx context.Context, r Requestor) (*StopReplicaResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*StopReplicaRequest) ResponseKind ¶
func (v *StopReplicaRequest) ResponseKind() Response
func (*StopReplicaRequest) SetVersion ¶
func (v *StopReplicaRequest) SetVersion(version int16)
type StopReplicaRequestTopic ¶
type StopReplicaRequestTopic struct { Topic string Partition int32 Partitions []int32 // v1+ PartitionStates []StopReplicaRequestTopicPartitionState // v3+ }
func NewStopReplicaRequestTopic ¶
func NewStopReplicaRequestTopic() StopReplicaRequestTopic
NewStopReplicaRequestTopic returns a default StopReplicaRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*StopReplicaRequestTopic) Default ¶
func (v *StopReplicaRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to StopReplicaRequestTopic.
type StopReplicaRequestTopicPartitionState ¶
func NewStopReplicaRequestTopicPartitionState ¶
func NewStopReplicaRequestTopicPartitionState() StopReplicaRequestTopicPartitionState
NewStopReplicaRequestTopicPartitionState returns a default StopReplicaRequestTopicPartitionState This is a shortcut for creating a struct and calling Default yourself.
func (*StopReplicaRequestTopicPartitionState) Default ¶
func (v *StopReplicaRequestTopicPartitionState) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to StopReplicaRequestTopicPartitionState.
type StopReplicaResponse ¶
type StopReplicaResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // Version 3 returns FENCED_LEADER_EPOCH if the leader is stale (KIP-570). ErrorCode int16 Partitions []StopReplicaResponsePartition }
StopReplicasResponse is returned from a StopReplicasRequest.
func NewPtrStopReplicaResponse ¶
func NewPtrStopReplicaResponse() *StopReplicaResponse
NewPtrStopReplicaResponse returns a pointer to a default StopReplicaResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewStopReplicaResponse ¶
func NewStopReplicaResponse() StopReplicaResponse
NewStopReplicaResponse returns a default StopReplicaResponse This is a shortcut for creating a struct and calling Default yourself.
func (*StopReplicaResponse) AppendTo ¶
func (v *StopReplicaResponse) AppendTo(dst []byte) []byte
func (*StopReplicaResponse) Default ¶
func (v *StopReplicaResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to StopReplicaResponse.
func (*StopReplicaResponse) GetVersion ¶
func (v *StopReplicaResponse) GetVersion() int16
func (*StopReplicaResponse) IsFlexible ¶
func (v *StopReplicaResponse) IsFlexible() bool
func (*StopReplicaResponse) Key ¶
func (*StopReplicaResponse) Key() int16
func (*StopReplicaResponse) MaxVersion ¶
func (*StopReplicaResponse) MaxVersion() int16
func (*StopReplicaResponse) ReadFrom ¶
func (v *StopReplicaResponse) ReadFrom(src []byte) error
func (*StopReplicaResponse) RequestKind ¶
func (v *StopReplicaResponse) RequestKind() Request
func (*StopReplicaResponse) SetVersion ¶
func (v *StopReplicaResponse) SetVersion(version int16)
type StopReplicaResponsePartition ¶
func NewStopReplicaResponsePartition ¶
func NewStopReplicaResponsePartition() StopReplicaResponsePartition
NewStopReplicaResponsePartition returns a default StopReplicaResponsePartition This is a shortcut for creating a struct and calling Default yourself.
func (*StopReplicaResponsePartition) Default ¶
func (v *StopReplicaResponsePartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to StopReplicaResponsePartition.
type SyncGroupRequest ¶
type SyncGroupRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // Group is the group ID this sync group is for. Group string // Generation is the group generation this sync is for. Generation int32 // MemberID is the member ID this member is. MemberID string // InstanceID is the instance ID of this member in the group (KIP-345). InstanceID *string // v3+ // ProtocolType is the "type" of protocol being used for this group. ProtocolType *string // v5+ // Protocol is the agreed upon protocol name (i.e. "sticky", "range"). Protocol *string // v5+ // GroupAssignment, sent only from the group leader, is the topic partition // assignment it has decided on for all members. GroupAssignment []SyncGroupRequestGroupAssignment }
SyncGroupRequest is issued by all group members after they receive a a response for JoinGroup. The group leader is responsible for sending member assignments with the request; all other members do not.
Once the leader sends the group assignment, all members will be replied to.
func NewPtrSyncGroupRequest ¶
func NewPtrSyncGroupRequest() *SyncGroupRequest
NewPtrSyncGroupRequest returns a pointer to a default SyncGroupRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewSyncGroupRequest ¶
func NewSyncGroupRequest() SyncGroupRequest
NewSyncGroupRequest returns a default SyncGroupRequest This is a shortcut for creating a struct and calling Default yourself.
func (*SyncGroupRequest) AppendTo ¶
func (v *SyncGroupRequest) AppendTo(dst []byte) []byte
func (*SyncGroupRequest) Default ¶
func (v *SyncGroupRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to SyncGroupRequest.
func (*SyncGroupRequest) GetVersion ¶
func (v *SyncGroupRequest) GetVersion() int16
func (*SyncGroupRequest) IsFlexible ¶
func (v *SyncGroupRequest) IsFlexible() bool
func (*SyncGroupRequest) IsGroupCoordinatorRequest ¶
func (v *SyncGroupRequest) IsGroupCoordinatorRequest()
func (*SyncGroupRequest) Key ¶
func (*SyncGroupRequest) Key() int16
func (*SyncGroupRequest) MaxVersion ¶
func (*SyncGroupRequest) MaxVersion() int16
func (*SyncGroupRequest) ReadFrom ¶
func (v *SyncGroupRequest) ReadFrom(src []byte) error
func (*SyncGroupRequest) RequestWith ¶
func (v *SyncGroupRequest) RequestWith(ctx context.Context, r Requestor) (*SyncGroupResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*SyncGroupRequest) ResponseKind ¶
func (v *SyncGroupRequest) ResponseKind() Response
func (*SyncGroupRequest) SetVersion ¶
func (v *SyncGroupRequest) SetVersion(version int16)
type SyncGroupRequestGroupAssignment ¶
type SyncGroupRequestGroupAssignment struct { // MemberID is the member this assignment is for. MemberID string // MemberAssignment is the assignment for this member. This is typically // of type GroupMemberAssignment. MemberAssignment []byte }
func NewSyncGroupRequestGroupAssignment ¶
func NewSyncGroupRequestGroupAssignment() SyncGroupRequestGroupAssignment
NewSyncGroupRequestGroupAssignment returns a default SyncGroupRequestGroupAssignment This is a shortcut for creating a struct and calling Default yourself.
func (*SyncGroupRequestGroupAssignment) Default ¶
func (v *SyncGroupRequestGroupAssignment) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to SyncGroupRequestGroupAssignment.
type SyncGroupResponse ¶
type SyncGroupResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 2. ThrottleMillis int32 // v1+ // ErrorCode is the error for the sync group request. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to the group (no read perms). // // INVALID_GROUP_ID is returned in the requested group ID is invalid. // // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available. // // NOT_COORDINATOR is returned if the requested broker is not the coordinator // for the requested group. // // UNKNOWN_MEMBER_ID is returned if the member ID is not a part of the group, // or if the group is empty or dead. // // ILLEGAL_GENERATION is returned if the request's generation ID is invalid. // // REBALANCE_IN_PROGRESS is returned if the group switched back to rebalancing. // // UNKNOWN_SERVER_ERROR is returned if the store of the group assignment // resulted in a too large message. ErrorCode int16 // ProtocolType is the "type" of protocol being used for this group. ProtocolType *string // v5+ // Protocol is the agreed upon protocol name (i.e. "sticky", "range"). Protocol *string // v5+ // MemberAssignment is the assignment for this member that the leader // determined. MemberAssignment []byte }
SyncGroupResponse is returned from a SyncGroupRequest.
func NewPtrSyncGroupResponse ¶
func NewPtrSyncGroupResponse() *SyncGroupResponse
NewPtrSyncGroupResponse returns a pointer to a default SyncGroupResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewSyncGroupResponse ¶
func NewSyncGroupResponse() SyncGroupResponse
NewSyncGroupResponse returns a default SyncGroupResponse This is a shortcut for creating a struct and calling Default yourself.
func (*SyncGroupResponse) AppendTo ¶
func (v *SyncGroupResponse) AppendTo(dst []byte) []byte
func (*SyncGroupResponse) Default ¶
func (v *SyncGroupResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to SyncGroupResponse.
func (*SyncGroupResponse) GetVersion ¶
func (v *SyncGroupResponse) GetVersion() int16
func (*SyncGroupResponse) IsFlexible ¶
func (v *SyncGroupResponse) IsFlexible() bool
func (*SyncGroupResponse) Key ¶
func (*SyncGroupResponse) Key() int16
func (*SyncGroupResponse) MaxVersion ¶
func (*SyncGroupResponse) MaxVersion() int16
func (*SyncGroupResponse) ReadFrom ¶
func (v *SyncGroupResponse) ReadFrom(src []byte) error
func (*SyncGroupResponse) RequestKind ¶
func (v *SyncGroupResponse) RequestKind() Request
func (*SyncGroupResponse) SetVersion ¶
func (v *SyncGroupResponse) SetVersion(version int16)
func (*SyncGroupResponse) Throttle ¶ added in v0.6.2
func (v *SyncGroupResponse) Throttle() (int32, bool)
type ThrottleResponse ¶ added in v0.6.2
type ThrottleResponse interface { // Throttle returns the response's throttle millis value and whether // Kafka applies the throttle after the response. Throttle() (int32, bool) }
ThrottleResponse represents a response that could have a throttle applied by Kafka.
Kafka 2.0.0 switched throttles from being applied before responses to being applied after responses.
type TransactionState ¶ added in v0.6.10
type TransactionState int8
TransactionState is the state of a transaction.
Possible values and their meanings:
* 0 (Empty)
* 1 (Ongoing)
* 2 (PrepareCommit)
* 3 (PrepareAbort)
* 4 (CompleteCommit)
* 5 (CompleteAbort)
* 6 (Dead)
* 7 (PrepareEpochFence)
const ( TransactionStateEmpty TransactionState = 0 TransactionStateOngoing TransactionState = 1 TransactionStatePrepareCommit TransactionState = 2 TransactionStatePrepareAbort TransactionState = 3 TransactionStateCompleteCommit TransactionState = 4 TransactionStateCompleteAbort TransactionState = 5 TransactionStateDead TransactionState = 6 TransactionStatePrepareEpochFence TransactionState = 7 )
func (TransactionState) String ¶ added in v0.6.10
func (v TransactionState) String() string
type TxnCoordinatorRequest ¶
type TxnCoordinatorRequest interface { // IsTxnCoordinatorRequest is a method attached to requests that // must be issued to transaction coordinators. IsTxnCoordinatorRequest() Request }
TxnCoordinatorRequest represents a request that must be issued to a transaction coordinator.
type TxnMetadataKey ¶
type TxnMetadataKey struct { // Version is the version of this type. Version int16 // TransactionalID is the transactional ID this record is for. TransactionalID string }
TxnMetadataKey is the key for the Kafka internal __transaction_state topic if the key starts with an int16 with a value of 0.
func NewTxnMetadataKey ¶
func NewTxnMetadataKey() TxnMetadataKey
NewTxnMetadataKey returns a default TxnMetadataKey This is a shortcut for creating a struct and calling Default yourself.
func (*TxnMetadataKey) AppendTo ¶
func (v *TxnMetadataKey) AppendTo(dst []byte) []byte
func (*TxnMetadataKey) Default ¶
func (v *TxnMetadataKey) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnMetadataKey.
func (*TxnMetadataKey) ReadFrom ¶
func (v *TxnMetadataKey) ReadFrom(src []byte) error
type TxnMetadataValue ¶
type TxnMetadataValue struct { // Version is the version of this value. Version int16 // ProducerID is the ID in use by the transactional ID. ProducerID int64 // ProducerEpoch is the epoch associated with the producer ID. ProducerEpoch int16 // TimeoutMillis is the timeout of this transaction in milliseconds. TimeoutMillis int32 // State is the state this transaction is in, // 0 is Empty, 1 is Ongoing, 2 is PrepareCommit, 3 is PrepareAbort, 4 is // CompleteCommit, 5 is CompleteAbort, 6 is Dead, and 7 is PrepareEpochFence. State TransactionState // Topics are topics that are involved in this transaction. Topics []TxnMetadataValueTopic // LastUpdateTimestamp is the timestamp in millis of when this transaction // was last updated. LastUpdateTimestamp int64 // StartTimestamp is the timestamp in millis of when this transaction started. StartTimestamp int64 }
TxnMetadataValue is the value for the Kafka internal __transaction_state topic if the key is of TxnMetadataKey type.
func NewTxnMetadataValue ¶
func NewTxnMetadataValue() TxnMetadataValue
NewTxnMetadataValue returns a default TxnMetadataValue This is a shortcut for creating a struct and calling Default yourself.
func (*TxnMetadataValue) AppendTo ¶
func (v *TxnMetadataValue) AppendTo(dst []byte) []byte
func (*TxnMetadataValue) Default ¶
func (v *TxnMetadataValue) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnMetadataValue.
func (*TxnMetadataValue) ReadFrom ¶
func (v *TxnMetadataValue) ReadFrom(src []byte) error
type TxnMetadataValueTopic ¶
type TxnMetadataValueTopic struct { // Topic is a topic involved in this transaction. Topic string // Partitions are partitions in this topic involved in the transaction. Partitions []int32 }
func NewTxnMetadataValueTopic ¶
func NewTxnMetadataValueTopic() TxnMetadataValueTopic
NewTxnMetadataValueTopic returns a default TxnMetadataValueTopic This is a shortcut for creating a struct and calling Default yourself.
func (*TxnMetadataValueTopic) Default ¶
func (v *TxnMetadataValueTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnMetadataValueTopic.
type TxnOffsetCommitRequest ¶
type TxnOffsetCommitRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TransactionalID is the transactional ID to use for this request. TransactionalID string // Group is the group consumed in this transaction and to be used for // committing. Group string // ProducerID is the producer ID of the client for this transactional ID // as received from InitProducerID. ProducerID int64 // ProducerEpoch is the producer epoch of the client for this transactional ID // as received from InitProducerID. ProducerEpoch int16 // Generation is the group generation this transactional offset commit request is for. Generation int32 // v3+ // MemberID is the member ID this member is for. MemberID string // v3+ // InstanceID is the instance ID of this member in the group (KIP-345, KIP-447). InstanceID *string // v3+ // Topics are topics to add for pending commits. Topics []TxnOffsetCommitRequestTopic }
TxnOffsetCommitRequest sends offsets that are a part of this transaction to be committed once the transaction itself finishes. This effectively replaces OffsetCommitRequest for when using transactions.
func NewPtrTxnOffsetCommitRequest ¶
func NewPtrTxnOffsetCommitRequest() *TxnOffsetCommitRequest
NewPtrTxnOffsetCommitRequest returns a pointer to a default TxnOffsetCommitRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewTxnOffsetCommitRequest ¶
func NewTxnOffsetCommitRequest() TxnOffsetCommitRequest
NewTxnOffsetCommitRequest returns a default TxnOffsetCommitRequest This is a shortcut for creating a struct and calling Default yourself.
func (*TxnOffsetCommitRequest) AppendTo ¶
func (v *TxnOffsetCommitRequest) AppendTo(dst []byte) []byte
func (*TxnOffsetCommitRequest) Default ¶
func (v *TxnOffsetCommitRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnOffsetCommitRequest.
func (*TxnOffsetCommitRequest) GetVersion ¶
func (v *TxnOffsetCommitRequest) GetVersion() int16
func (*TxnOffsetCommitRequest) IsFlexible ¶
func (v *TxnOffsetCommitRequest) IsFlexible() bool
func (*TxnOffsetCommitRequest) IsGroupCoordinatorRequest ¶
func (v *TxnOffsetCommitRequest) IsGroupCoordinatorRequest()
func (*TxnOffsetCommitRequest) Key ¶
func (*TxnOffsetCommitRequest) Key() int16
func (*TxnOffsetCommitRequest) MaxVersion ¶
func (*TxnOffsetCommitRequest) MaxVersion() int16
func (*TxnOffsetCommitRequest) ReadFrom ¶
func (v *TxnOffsetCommitRequest) ReadFrom(src []byte) error
func (*TxnOffsetCommitRequest) RequestWith ¶
func (v *TxnOffsetCommitRequest) RequestWith(ctx context.Context, r Requestor) (*TxnOffsetCommitResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*TxnOffsetCommitRequest) ResponseKind ¶
func (v *TxnOffsetCommitRequest) ResponseKind() Response
func (*TxnOffsetCommitRequest) SetVersion ¶
func (v *TxnOffsetCommitRequest) SetVersion(version int16)
type TxnOffsetCommitRequestTopic ¶
type TxnOffsetCommitRequestTopic struct { // Topic is a topic to add for a pending commit. Topic string // Partitions are partitions to add for pending commits. Partitions []TxnOffsetCommitRequestTopicPartition }
func NewTxnOffsetCommitRequestTopic ¶
func NewTxnOffsetCommitRequestTopic() TxnOffsetCommitRequestTopic
NewTxnOffsetCommitRequestTopic returns a default TxnOffsetCommitRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*TxnOffsetCommitRequestTopic) Default ¶
func (v *TxnOffsetCommitRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnOffsetCommitRequestTopic.
type TxnOffsetCommitRequestTopicPartition ¶
type TxnOffsetCommitRequestTopicPartition struct { // Partition is a partition to add for a pending commit. Partition int32 // Offset is the offset within partition to commit once EndTxnRequest is // called (with commit; abort obviously aborts). Offset int64 // LeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0, // allows brokers to check if the client is fenced (has an out of date // leader) or is using an unknown leader. // // The initial leader epoch can be determined from a MetadataResponse. // To skip log truncation checking, use -1. LeaderEpoch int32 // v2+ // Metadata is optional metadata the client wants to include with this // commit. Metadata *string }
func NewTxnOffsetCommitRequestTopicPartition ¶
func NewTxnOffsetCommitRequestTopicPartition() TxnOffsetCommitRequestTopicPartition
NewTxnOffsetCommitRequestTopicPartition returns a default TxnOffsetCommitRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*TxnOffsetCommitRequestTopicPartition) Default ¶
func (v *TxnOffsetCommitRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnOffsetCommitRequestTopicPartition.
type TxnOffsetCommitResponse ¶
type TxnOffsetCommitResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after this request. // For Kafka < 2.0.0, the throttle is applied before issuing a response. // For Kafka >= 2.0.0, the throttle is applied after issuing a response. // // This request switched at version 1. ThrottleMillis int32 // Topics contains responses to the topics in the request. Topics []TxnOffsetCommitResponseTopic }
TxnOffsetCommitResponse is a response to a TxnOffsetCommitRequest.
func NewPtrTxnOffsetCommitResponse ¶
func NewPtrTxnOffsetCommitResponse() *TxnOffsetCommitResponse
NewPtrTxnOffsetCommitResponse returns a pointer to a default TxnOffsetCommitResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewTxnOffsetCommitResponse ¶
func NewTxnOffsetCommitResponse() TxnOffsetCommitResponse
NewTxnOffsetCommitResponse returns a default TxnOffsetCommitResponse This is a shortcut for creating a struct and calling Default yourself.
func (*TxnOffsetCommitResponse) AppendTo ¶
func (v *TxnOffsetCommitResponse) AppendTo(dst []byte) []byte
func (*TxnOffsetCommitResponse) Default ¶
func (v *TxnOffsetCommitResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnOffsetCommitResponse.
func (*TxnOffsetCommitResponse) GetVersion ¶
func (v *TxnOffsetCommitResponse) GetVersion() int16
func (*TxnOffsetCommitResponse) IsFlexible ¶
func (v *TxnOffsetCommitResponse) IsFlexible() bool
func (*TxnOffsetCommitResponse) Key ¶
func (*TxnOffsetCommitResponse) Key() int16
func (*TxnOffsetCommitResponse) MaxVersion ¶
func (*TxnOffsetCommitResponse) MaxVersion() int16
func (*TxnOffsetCommitResponse) ReadFrom ¶
func (v *TxnOffsetCommitResponse) ReadFrom(src []byte) error
func (*TxnOffsetCommitResponse) RequestKind ¶
func (v *TxnOffsetCommitResponse) RequestKind() Request
func (*TxnOffsetCommitResponse) SetVersion ¶
func (v *TxnOffsetCommitResponse) SetVersion(version int16)
func (*TxnOffsetCommitResponse) Throttle ¶ added in v0.6.2
func (v *TxnOffsetCommitResponse) Throttle() (int32, bool)
type TxnOffsetCommitResponseTopic ¶
type TxnOffsetCommitResponseTopic struct { // Topic is the topic this response is for. Topic string // Partitions contains responses to the partitions in this topic. Partitions []TxnOffsetCommitResponseTopicPartition }
func NewTxnOffsetCommitResponseTopic ¶
func NewTxnOffsetCommitResponseTopic() TxnOffsetCommitResponseTopic
NewTxnOffsetCommitResponseTopic returns a default TxnOffsetCommitResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*TxnOffsetCommitResponseTopic) Default ¶
func (v *TxnOffsetCommitResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnOffsetCommitResponseTopic.
type TxnOffsetCommitResponseTopicPartition ¶
type TxnOffsetCommitResponseTopicPartition struct { // Partition is the partition this response is for. Partition int32 // ErrorCode is any error for this topic/partition commit. // // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned if the client is // not authorized for write with transactional IDs with the requested // transactional ID. // // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized // to read group with the requested group id. // // TOPIC_AUTHORIZATION_FAILED is returned for all topics that the client // is not authorized to read. // // UNKNOWN_TOPIC_OR_PARTITION is returned for all topics or partitions // that the broker does not know of. // // INVALID_GROUP_ID is returned if the requested group does not exist. // // COORDINATOR_NOT_AVAILABLE is returned if the broker is not yet fully // started or is shutting down, or if the group was just deleted or is // migrating to another broker. // // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is still loading. // // NOT_COORDINATOR is returned if the broker is not the coordinator for // the group. // // FENCED_INSTANCE_ID is returned if the member is fenced (another newer // transactional member is using the same instance ID). // // UNKNOWN_MEMBER_ID is returned if the consumer group does not know of // this member. // // ILLEGAL_GENERATION is returned if the consumer group's generation is // different than the requested generation. // // OFFSET_METADATA_TOO_LARGE is returned if the commit metadata is too // large. // // REBALANCE_IN_PROGRESS is returned if the group is completing a rebalance. ErrorCode int16 }
func NewTxnOffsetCommitResponseTopicPartition ¶
func NewTxnOffsetCommitResponseTopicPartition() TxnOffsetCommitResponseTopicPartition
NewTxnOffsetCommitResponseTopicPartition returns a default TxnOffsetCommitResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*TxnOffsetCommitResponseTopicPartition) Default ¶
func (v *TxnOffsetCommitResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to TxnOffsetCommitResponseTopicPartition.
type UnregisterBrokerRequest ¶ added in v0.6.5
type UnregisterBrokerRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // The broker ID to unregister. BrokerID int32 }
For KIP-500 / KIP-631, UnregisterBrokerRequest is an admin request to remove registration of a broker from the cluster.
func NewPtrUnregisterBrokerRequest ¶ added in v0.6.5
func NewPtrUnregisterBrokerRequest() *UnregisterBrokerRequest
NewPtrUnregisterBrokerRequest returns a pointer to a default UnregisterBrokerRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewUnregisterBrokerRequest ¶ added in v0.6.5
func NewUnregisterBrokerRequest() UnregisterBrokerRequest
NewUnregisterBrokerRequest returns a default UnregisterBrokerRequest This is a shortcut for creating a struct and calling Default yourself.
func (*UnregisterBrokerRequest) AppendTo ¶ added in v0.6.5
func (v *UnregisterBrokerRequest) AppendTo(dst []byte) []byte
func (*UnregisterBrokerRequest) Default ¶ added in v0.6.5
func (v *UnregisterBrokerRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UnregisterBrokerRequest.
func (*UnregisterBrokerRequest) GetVersion ¶ added in v0.6.5
func (v *UnregisterBrokerRequest) GetVersion() int16
func (*UnregisterBrokerRequest) IsFlexible ¶ added in v0.6.5
func (v *UnregisterBrokerRequest) IsFlexible() bool
func (*UnregisterBrokerRequest) Key ¶ added in v0.6.5
func (*UnregisterBrokerRequest) Key() int16
func (*UnregisterBrokerRequest) MaxVersion ¶ added in v0.6.5
func (*UnregisterBrokerRequest) MaxVersion() int16
func (*UnregisterBrokerRequest) ReadFrom ¶ added in v0.6.5
func (v *UnregisterBrokerRequest) ReadFrom(src []byte) error
func (*UnregisterBrokerRequest) RequestWith ¶ added in v0.6.5
func (v *UnregisterBrokerRequest) RequestWith(ctx context.Context, r Requestor) (*UnregisterBrokerResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*UnregisterBrokerRequest) ResponseKind ¶ added in v0.6.5
func (v *UnregisterBrokerRequest) ResponseKind() Response
func (*UnregisterBrokerRequest) SetVersion ¶ added in v0.6.5
func (v *UnregisterBrokerRequest) SetVersion(version int16)
type UnregisterBrokerResponse ¶ added in v0.6.5
type UnregisterBrokerResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // Any error code, or 0. ErrorCode int16 // The error message, if any. ErrorMessage *string }
UnregisterBrokerResponse is a response to a UnregisterBrokerRequest.
func NewPtrUnregisterBrokerResponse ¶ added in v0.6.5
func NewPtrUnregisterBrokerResponse() *UnregisterBrokerResponse
NewPtrUnregisterBrokerResponse returns a pointer to a default UnregisterBrokerResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewUnregisterBrokerResponse ¶ added in v0.6.5
func NewUnregisterBrokerResponse() UnregisterBrokerResponse
NewUnregisterBrokerResponse returns a default UnregisterBrokerResponse This is a shortcut for creating a struct and calling Default yourself.
func (*UnregisterBrokerResponse) AppendTo ¶ added in v0.6.5
func (v *UnregisterBrokerResponse) AppendTo(dst []byte) []byte
func (*UnregisterBrokerResponse) Default ¶ added in v0.6.5
func (v *UnregisterBrokerResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UnregisterBrokerResponse.
func (*UnregisterBrokerResponse) GetVersion ¶ added in v0.6.5
func (v *UnregisterBrokerResponse) GetVersion() int16
func (*UnregisterBrokerResponse) IsFlexible ¶ added in v0.6.5
func (v *UnregisterBrokerResponse) IsFlexible() bool
func (*UnregisterBrokerResponse) Key ¶ added in v0.6.5
func (*UnregisterBrokerResponse) Key() int16
func (*UnregisterBrokerResponse) MaxVersion ¶ added in v0.6.5
func (*UnregisterBrokerResponse) MaxVersion() int16
func (*UnregisterBrokerResponse) ReadFrom ¶ added in v0.6.5
func (v *UnregisterBrokerResponse) ReadFrom(src []byte) error
func (*UnregisterBrokerResponse) RequestKind ¶ added in v0.6.5
func (v *UnregisterBrokerResponse) RequestKind() Request
func (*UnregisterBrokerResponse) SetVersion ¶ added in v0.6.5
func (v *UnregisterBrokerResponse) SetVersion(version int16)
func (*UnregisterBrokerResponse) Throttle ¶ added in v0.6.5
func (v *UnregisterBrokerResponse) Throttle() (int32, bool)
type UpdateFeaturesRequest ¶
type UpdateFeaturesRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 // TimeoutMillis is the millisecond timeout of this request. TimeoutMillis int32 // The list of updates to finalized features. FeatureUpdates []UpdateFeaturesRequestFeatureUpdate }
From KIP-584 and introduced in 2.7.0, this request updates broker-wide features.
func NewPtrUpdateFeaturesRequest ¶
func NewPtrUpdateFeaturesRequest() *UpdateFeaturesRequest
NewPtrUpdateFeaturesRequest returns a pointer to a default UpdateFeaturesRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewUpdateFeaturesRequest ¶
func NewUpdateFeaturesRequest() UpdateFeaturesRequest
NewUpdateFeaturesRequest returns a default UpdateFeaturesRequest This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateFeaturesRequest) AppendTo ¶
func (v *UpdateFeaturesRequest) AppendTo(dst []byte) []byte
func (*UpdateFeaturesRequest) Default ¶
func (v *UpdateFeaturesRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateFeaturesRequest.
func (*UpdateFeaturesRequest) GetVersion ¶
func (v *UpdateFeaturesRequest) GetVersion() int16
func (*UpdateFeaturesRequest) IsAdminRequest ¶
func (v *UpdateFeaturesRequest) IsAdminRequest()
func (*UpdateFeaturesRequest) IsFlexible ¶
func (v *UpdateFeaturesRequest) IsFlexible() bool
func (*UpdateFeaturesRequest) Key ¶
func (*UpdateFeaturesRequest) Key() int16
func (*UpdateFeaturesRequest) MaxVersion ¶
func (*UpdateFeaturesRequest) MaxVersion() int16
func (*UpdateFeaturesRequest) ReadFrom ¶
func (v *UpdateFeaturesRequest) ReadFrom(src []byte) error
func (*UpdateFeaturesRequest) RequestWith ¶
func (v *UpdateFeaturesRequest) RequestWith(ctx context.Context, r Requestor) (*UpdateFeaturesResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*UpdateFeaturesRequest) ResponseKind ¶
func (v *UpdateFeaturesRequest) ResponseKind() Response
func (*UpdateFeaturesRequest) SetVersion ¶
func (v *UpdateFeaturesRequest) SetVersion(version int16)
type UpdateFeaturesRequestFeatureUpdate ¶
type UpdateFeaturesRequestFeatureUpdate struct { // The name of the finalized feature to update. Feature string // The new maximum version level for the finalized feature. A value >= 1 is // valid. A value < 1, is special, and can be used to request the deletion // of the finalized feature. MaxVersionLevel int16 // When set to true, the finalized feature version level is allowed to be // downgraded/deleted. The downgrade request will fail if the new maximum // version level is a value that's not lower than the existing maximum // finalized version level. AllowDowngrade bool }
func NewUpdateFeaturesRequestFeatureUpdate ¶
func NewUpdateFeaturesRequestFeatureUpdate() UpdateFeaturesRequestFeatureUpdate
NewUpdateFeaturesRequestFeatureUpdate returns a default UpdateFeaturesRequestFeatureUpdate This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateFeaturesRequestFeatureUpdate) Default ¶
func (v *UpdateFeaturesRequestFeatureUpdate) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateFeaturesRequestFeatureUpdate.
type UpdateFeaturesResponse ¶
type UpdateFeaturesResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 // ThrottleMillis is how long of a throttle Kafka will apply to the client // after responding to this request. ThrottleMillis int32 // The top level error code, if any. ErrorCode int16 // An informative message if the request errored, if any. ErrorMessage *string // The results for each feature update request. Results []UpdateFeaturesResponseResult }
func NewPtrUpdateFeaturesResponse ¶
func NewPtrUpdateFeaturesResponse() *UpdateFeaturesResponse
NewPtrUpdateFeaturesResponse returns a pointer to a default UpdateFeaturesResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewUpdateFeaturesResponse ¶
func NewUpdateFeaturesResponse() UpdateFeaturesResponse
NewUpdateFeaturesResponse returns a default UpdateFeaturesResponse This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateFeaturesResponse) AppendTo ¶
func (v *UpdateFeaturesResponse) AppendTo(dst []byte) []byte
func (*UpdateFeaturesResponse) Default ¶
func (v *UpdateFeaturesResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateFeaturesResponse.
func (*UpdateFeaturesResponse) GetVersion ¶
func (v *UpdateFeaturesResponse) GetVersion() int16
func (*UpdateFeaturesResponse) IsFlexible ¶
func (v *UpdateFeaturesResponse) IsFlexible() bool
func (*UpdateFeaturesResponse) Key ¶
func (*UpdateFeaturesResponse) Key() int16
func (*UpdateFeaturesResponse) MaxVersion ¶
func (*UpdateFeaturesResponse) MaxVersion() int16
func (*UpdateFeaturesResponse) ReadFrom ¶
func (v *UpdateFeaturesResponse) ReadFrom(src []byte) error
func (*UpdateFeaturesResponse) RequestKind ¶
func (v *UpdateFeaturesResponse) RequestKind() Request
func (*UpdateFeaturesResponse) SetVersion ¶
func (v *UpdateFeaturesResponse) SetVersion(version int16)
func (*UpdateFeaturesResponse) Throttle ¶ added in v0.6.2
func (v *UpdateFeaturesResponse) Throttle() (int32, bool)
type UpdateFeaturesResponseResult ¶
type UpdateFeaturesResponseResult struct { // The name of the finalized feature. Feature string // The feature update error code, if any. ErrorCode int16 // The feature update error, if any. ErrorMessage *string }
func NewUpdateFeaturesResponseResult ¶
func NewUpdateFeaturesResponseResult() UpdateFeaturesResponseResult
NewUpdateFeaturesResponseResult returns a default UpdateFeaturesResponseResult This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateFeaturesResponseResult) Default ¶
func (v *UpdateFeaturesResponseResult) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateFeaturesResponseResult.
type UpdateMetadataRequest ¶
type UpdateMetadataRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 ControllerID int32 ControllerEpoch int32 BrokerEpoch int64 // v5+ PartitionStates []UpdateMetadataRequestTopicPartition TopicStates []UpdateMetadataRequestTopicState // v5+ LiveBrokers []UpdateMetadataRequestLiveBroker }
UpdateMetadataRequest is an advanced request that brokers use to issue metadata updates to each other.
As this is an advanced request and there is little reason to issue it as a client, this request is undocumented.
Version 1 changed the layout of the live brokers.
Kafka 2.2.0 introduced version 5, proposed in KIP-380, which changed the layout of the struct to be more memory efficient.
func NewPtrUpdateMetadataRequest ¶
func NewPtrUpdateMetadataRequest() *UpdateMetadataRequest
NewPtrUpdateMetadataRequest returns a pointer to a default UpdateMetadataRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewUpdateMetadataRequest ¶
func NewUpdateMetadataRequest() UpdateMetadataRequest
NewUpdateMetadataRequest returns a default UpdateMetadataRequest This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateMetadataRequest) AppendTo ¶
func (v *UpdateMetadataRequest) AppendTo(dst []byte) []byte
func (*UpdateMetadataRequest) Default ¶
func (v *UpdateMetadataRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateMetadataRequest.
func (*UpdateMetadataRequest) GetVersion ¶
func (v *UpdateMetadataRequest) GetVersion() int16
func (*UpdateMetadataRequest) IsFlexible ¶
func (v *UpdateMetadataRequest) IsFlexible() bool
func (*UpdateMetadataRequest) Key ¶
func (*UpdateMetadataRequest) Key() int16
func (*UpdateMetadataRequest) MaxVersion ¶
func (*UpdateMetadataRequest) MaxVersion() int16
func (*UpdateMetadataRequest) ReadFrom ¶
func (v *UpdateMetadataRequest) ReadFrom(src []byte) error
func (*UpdateMetadataRequest) RequestWith ¶
func (v *UpdateMetadataRequest) RequestWith(ctx context.Context, r Requestor) (*UpdateMetadataResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*UpdateMetadataRequest) ResponseKind ¶
func (v *UpdateMetadataRequest) ResponseKind() Response
func (*UpdateMetadataRequest) SetVersion ¶
func (v *UpdateMetadataRequest) SetVersion(version int16)
type UpdateMetadataRequestLiveBroker ¶
type UpdateMetadataRequestLiveBroker struct { ID int32 Host string Port int32 Endpoints []UpdateMetadataRequestLiveBrokerEndpoint // v1+ Rack *string // v2+ }
func NewUpdateMetadataRequestLiveBroker ¶
func NewUpdateMetadataRequestLiveBroker() UpdateMetadataRequestLiveBroker
NewUpdateMetadataRequestLiveBroker returns a default UpdateMetadataRequestLiveBroker This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateMetadataRequestLiveBroker) Default ¶
func (v *UpdateMetadataRequestLiveBroker) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateMetadataRequestLiveBroker.
type UpdateMetadataRequestLiveBrokerEndpoint ¶
type UpdateMetadataRequestLiveBrokerEndpoint struct { Port int32 Host string ListenerName string // v3+ SecurityProtocol int16 }
func NewUpdateMetadataRequestLiveBrokerEndpoint ¶
func NewUpdateMetadataRequestLiveBrokerEndpoint() UpdateMetadataRequestLiveBrokerEndpoint
NewUpdateMetadataRequestLiveBrokerEndpoint returns a default UpdateMetadataRequestLiveBrokerEndpoint This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateMetadataRequestLiveBrokerEndpoint) Default ¶
func (v *UpdateMetadataRequestLiveBrokerEndpoint) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateMetadataRequestLiveBrokerEndpoint.
type UpdateMetadataRequestTopicPartition ¶
type UpdateMetadataRequestTopicPartition struct { Topic string Partition int32 ControllerEpoch int32 Leader int32 LeaderEpoch int32 ISR []int32 ZKVersion int32 Replicas []int32 OfflineReplicas []int32 }
func NewUpdateMetadataRequestTopicPartition ¶
func NewUpdateMetadataRequestTopicPartition() UpdateMetadataRequestTopicPartition
NewUpdateMetadataRequestTopicPartition returns a default UpdateMetadataRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateMetadataRequestTopicPartition) Default ¶
func (v *UpdateMetadataRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateMetadataRequestTopicPartition.
type UpdateMetadataRequestTopicState ¶
type UpdateMetadataRequestTopicState struct { Topic string TopicID [16]byte // v7+ PartitionStates []UpdateMetadataRequestTopicPartition }
func NewUpdateMetadataRequestTopicState ¶
func NewUpdateMetadataRequestTopicState() UpdateMetadataRequestTopicState
NewUpdateMetadataRequestTopicState returns a default UpdateMetadataRequestTopicState This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateMetadataRequestTopicState) Default ¶
func (v *UpdateMetadataRequestTopicState) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateMetadataRequestTopicState.
type UpdateMetadataResponse ¶
type UpdateMetadataResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 ErrorCode int16 }
UpdateMetadataResponses is returned from an UpdateMetadataRequest.
func NewPtrUpdateMetadataResponse ¶
func NewPtrUpdateMetadataResponse() *UpdateMetadataResponse
NewPtrUpdateMetadataResponse returns a pointer to a default UpdateMetadataResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewUpdateMetadataResponse ¶
func NewUpdateMetadataResponse() UpdateMetadataResponse
NewUpdateMetadataResponse returns a default UpdateMetadataResponse This is a shortcut for creating a struct and calling Default yourself.
func (*UpdateMetadataResponse) AppendTo ¶
func (v *UpdateMetadataResponse) AppendTo(dst []byte) []byte
func (*UpdateMetadataResponse) Default ¶
func (v *UpdateMetadataResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to UpdateMetadataResponse.
func (*UpdateMetadataResponse) GetVersion ¶
func (v *UpdateMetadataResponse) GetVersion() int16
func (*UpdateMetadataResponse) IsFlexible ¶
func (v *UpdateMetadataResponse) IsFlexible() bool
func (*UpdateMetadataResponse) Key ¶
func (*UpdateMetadataResponse) Key() int16
func (*UpdateMetadataResponse) MaxVersion ¶
func (*UpdateMetadataResponse) MaxVersion() int16
func (*UpdateMetadataResponse) ReadFrom ¶
func (v *UpdateMetadataResponse) ReadFrom(src []byte) error
func (*UpdateMetadataResponse) RequestKind ¶
func (v *UpdateMetadataResponse) RequestKind() Request
func (*UpdateMetadataResponse) SetVersion ¶
func (v *UpdateMetadataResponse) SetVersion(version int16)
type VoteRequest ¶
type VoteRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 ClusterID *string Topics []VoteRequestTopic }
Part of KIP-595 to replace Kafka's dependence on Zookeeper with a Kafka-only raft protocol, VoteRequest is used by voters to hold a leader election.
Since this is relatively Kafka internal, most fields are left undocumented.
func NewPtrVoteRequest ¶
func NewPtrVoteRequest() *VoteRequest
NewPtrVoteRequest returns a pointer to a default VoteRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewVoteRequest ¶
func NewVoteRequest() VoteRequest
NewVoteRequest returns a default VoteRequest This is a shortcut for creating a struct and calling Default yourself.
func (*VoteRequest) AppendTo ¶
func (v *VoteRequest) AppendTo(dst []byte) []byte
func (*VoteRequest) Default ¶
func (v *VoteRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to VoteRequest.
func (*VoteRequest) GetVersion ¶
func (v *VoteRequest) GetVersion() int16
func (*VoteRequest) IsAdminRequest ¶
func (v *VoteRequest) IsAdminRequest()
func (*VoteRequest) IsFlexible ¶
func (v *VoteRequest) IsFlexible() bool
func (*VoteRequest) Key ¶
func (*VoteRequest) Key() int16
func (*VoteRequest) MaxVersion ¶
func (*VoteRequest) MaxVersion() int16
func (*VoteRequest) ReadFrom ¶
func (v *VoteRequest) ReadFrom(src []byte) error
func (*VoteRequest) RequestWith ¶
func (v *VoteRequest) RequestWith(ctx context.Context, r Requestor) (*VoteResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*VoteRequest) ResponseKind ¶
func (v *VoteRequest) ResponseKind() Response
func (*VoteRequest) SetVersion ¶
func (v *VoteRequest) SetVersion(version int16)
type VoteRequestTopic ¶
type VoteRequestTopic struct { Topic string Partitions []VoteRequestTopicPartition }
func NewVoteRequestTopic ¶
func NewVoteRequestTopic() VoteRequestTopic
NewVoteRequestTopic returns a default VoteRequestTopic This is a shortcut for creating a struct and calling Default yourself.
func (*VoteRequestTopic) Default ¶
func (v *VoteRequestTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to VoteRequestTopic.
type VoteRequestTopicPartition ¶
type VoteRequestTopicPartition struct { Partition int32 // The bumped epoch of the candidate sending the request. CandidateEpoch int32 // The ID of the voter sending the request. CandidateID int32 // The epoch of the last record written to the metadata log. LastOffsetEpoch int32 // The offset of the last record written to the metadata log. LastOffset int64 }
func NewVoteRequestTopicPartition ¶
func NewVoteRequestTopicPartition() VoteRequestTopicPartition
NewVoteRequestTopicPartition returns a default VoteRequestTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*VoteRequestTopicPartition) Default ¶
func (v *VoteRequestTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to VoteRequestTopicPartition.
type VoteResponse ¶
type VoteResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 ErrorCode int16 Topics []VoteResponseTopic }
func NewPtrVoteResponse ¶
func NewPtrVoteResponse() *VoteResponse
NewPtrVoteResponse returns a pointer to a default VoteResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewVoteResponse ¶
func NewVoteResponse() VoteResponse
NewVoteResponse returns a default VoteResponse This is a shortcut for creating a struct and calling Default yourself.
func (*VoteResponse) AppendTo ¶
func (v *VoteResponse) AppendTo(dst []byte) []byte
func (*VoteResponse) Default ¶
func (v *VoteResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to VoteResponse.
func (*VoteResponse) GetVersion ¶
func (v *VoteResponse) GetVersion() int16
func (*VoteResponse) IsFlexible ¶
func (v *VoteResponse) IsFlexible() bool
func (*VoteResponse) Key ¶
func (*VoteResponse) Key() int16
func (*VoteResponse) MaxVersion ¶
func (*VoteResponse) MaxVersion() int16
func (*VoteResponse) ReadFrom ¶
func (v *VoteResponse) ReadFrom(src []byte) error
func (*VoteResponse) RequestKind ¶
func (v *VoteResponse) RequestKind() Request
func (*VoteResponse) SetVersion ¶
func (v *VoteResponse) SetVersion(version int16)
type VoteResponseTopic ¶
type VoteResponseTopic struct { Topic string Partitions []VoteResponseTopicPartition }
func NewVoteResponseTopic ¶
func NewVoteResponseTopic() VoteResponseTopic
NewVoteResponseTopic returns a default VoteResponseTopic This is a shortcut for creating a struct and calling Default yourself.
func (*VoteResponseTopic) Default ¶
func (v *VoteResponseTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to VoteResponseTopic.
type VoteResponseTopicPartition ¶
type VoteResponseTopicPartition struct { Partition int32 ErrorCode int16 // The ID of the current leader, or -1 if the leader is unknown. LeaderID int32 // Whether the vote was granted. VoteGranted bool }
func NewVoteResponseTopicPartition ¶
func NewVoteResponseTopicPartition() VoteResponseTopicPartition
NewVoteResponseTopicPartition returns a default VoteResponseTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*VoteResponseTopicPartition) Default ¶
func (v *VoteResponseTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to VoteResponseTopicPartition.
type WriteTxnMarkersRequest ¶
type WriteTxnMarkersRequest struct { // Version is the version of this message used with a Kafka broker. Version int16 Markers []WriteTxnMarkersRequestMarker }
WriteTxnMarkersRequest is a broker-to-broker request that Kafka uses to finish transactions. Since this is specifically for inter-broker communication, this is left undocumented.
func NewPtrWriteTxnMarkersRequest ¶
func NewPtrWriteTxnMarkersRequest() *WriteTxnMarkersRequest
NewPtrWriteTxnMarkersRequest returns a pointer to a default WriteTxnMarkersRequest This is a shortcut for creating a new(struct) and calling Default yourself.
func NewWriteTxnMarkersRequest ¶
func NewWriteTxnMarkersRequest() WriteTxnMarkersRequest
NewWriteTxnMarkersRequest returns a default WriteTxnMarkersRequest This is a shortcut for creating a struct and calling Default yourself.
func (*WriteTxnMarkersRequest) AppendTo ¶
func (v *WriteTxnMarkersRequest) AppendTo(dst []byte) []byte
func (*WriteTxnMarkersRequest) Default ¶
func (v *WriteTxnMarkersRequest) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to WriteTxnMarkersRequest.
func (*WriteTxnMarkersRequest) GetVersion ¶
func (v *WriteTxnMarkersRequest) GetVersion() int16
func (*WriteTxnMarkersRequest) IsFlexible ¶
func (v *WriteTxnMarkersRequest) IsFlexible() bool
func (*WriteTxnMarkersRequest) Key ¶
func (*WriteTxnMarkersRequest) Key() int16
func (*WriteTxnMarkersRequest) MaxVersion ¶
func (*WriteTxnMarkersRequest) MaxVersion() int16
func (*WriteTxnMarkersRequest) ReadFrom ¶
func (v *WriteTxnMarkersRequest) ReadFrom(src []byte) error
func (*WriteTxnMarkersRequest) RequestWith ¶
func (v *WriteTxnMarkersRequest) RequestWith(ctx context.Context, r Requestor) (*WriteTxnMarkersResponse, error)
RequestWith is requests v on r and returns the response or an error.
func (*WriteTxnMarkersRequest) ResponseKind ¶
func (v *WriteTxnMarkersRequest) ResponseKind() Response
func (*WriteTxnMarkersRequest) SetVersion ¶
func (v *WriteTxnMarkersRequest) SetVersion(version int16)
type WriteTxnMarkersRequestMarker ¶
type WriteTxnMarkersRequestMarker struct { ProducerID int64 ProducerEpoch int16 Committed bool Topics []WriteTxnMarkersRequestMarkerTopic CoordinatorEpoch int32 }
func NewWriteTxnMarkersRequestMarker ¶
func NewWriteTxnMarkersRequestMarker() WriteTxnMarkersRequestMarker
NewWriteTxnMarkersRequestMarker returns a default WriteTxnMarkersRequestMarker This is a shortcut for creating a struct and calling Default yourself.
func (*WriteTxnMarkersRequestMarker) Default ¶
func (v *WriteTxnMarkersRequestMarker) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to WriteTxnMarkersRequestMarker.
type WriteTxnMarkersRequestMarkerTopic ¶
func NewWriteTxnMarkersRequestMarkerTopic ¶
func NewWriteTxnMarkersRequestMarkerTopic() WriteTxnMarkersRequestMarkerTopic
NewWriteTxnMarkersRequestMarkerTopic returns a default WriteTxnMarkersRequestMarkerTopic This is a shortcut for creating a struct and calling Default yourself.
func (*WriteTxnMarkersRequestMarkerTopic) Default ¶
func (v *WriteTxnMarkersRequestMarkerTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to WriteTxnMarkersRequestMarkerTopic.
type WriteTxnMarkersResponse ¶
type WriteTxnMarkersResponse struct { // Version is the version of this message used with a Kafka broker. Version int16 Markers []WriteTxnMarkersResponseMarker }
WriteTxnMarkersResponse is a response to a WriteTxnMarkersRequest.
func NewPtrWriteTxnMarkersResponse ¶
func NewPtrWriteTxnMarkersResponse() *WriteTxnMarkersResponse
NewPtrWriteTxnMarkersResponse returns a pointer to a default WriteTxnMarkersResponse This is a shortcut for creating a new(struct) and calling Default yourself.
func NewWriteTxnMarkersResponse ¶
func NewWriteTxnMarkersResponse() WriteTxnMarkersResponse
NewWriteTxnMarkersResponse returns a default WriteTxnMarkersResponse This is a shortcut for creating a struct and calling Default yourself.
func (*WriteTxnMarkersResponse) AppendTo ¶
func (v *WriteTxnMarkersResponse) AppendTo(dst []byte) []byte
func (*WriteTxnMarkersResponse) Default ¶
func (v *WriteTxnMarkersResponse) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to WriteTxnMarkersResponse.
func (*WriteTxnMarkersResponse) GetVersion ¶
func (v *WriteTxnMarkersResponse) GetVersion() int16
func (*WriteTxnMarkersResponse) IsFlexible ¶
func (v *WriteTxnMarkersResponse) IsFlexible() bool
func (*WriteTxnMarkersResponse) Key ¶
func (*WriteTxnMarkersResponse) Key() int16
func (*WriteTxnMarkersResponse) MaxVersion ¶
func (*WriteTxnMarkersResponse) MaxVersion() int16
func (*WriteTxnMarkersResponse) ReadFrom ¶
func (v *WriteTxnMarkersResponse) ReadFrom(src []byte) error
func (*WriteTxnMarkersResponse) RequestKind ¶
func (v *WriteTxnMarkersResponse) RequestKind() Request
func (*WriteTxnMarkersResponse) SetVersion ¶
func (v *WriteTxnMarkersResponse) SetVersion(version int16)
type WriteTxnMarkersResponseMarker ¶
type WriteTxnMarkersResponseMarker struct { ProducerID int64 Topics []WriteTxnMarkersResponseMarkerTopic }
func NewWriteTxnMarkersResponseMarker ¶
func NewWriteTxnMarkersResponseMarker() WriteTxnMarkersResponseMarker
NewWriteTxnMarkersResponseMarker returns a default WriteTxnMarkersResponseMarker This is a shortcut for creating a struct and calling Default yourself.
func (*WriteTxnMarkersResponseMarker) Default ¶
func (v *WriteTxnMarkersResponseMarker) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to WriteTxnMarkersResponseMarker.
type WriteTxnMarkersResponseMarkerTopic ¶
type WriteTxnMarkersResponseMarkerTopic struct { Topic string Partitions []WriteTxnMarkersResponseMarkerTopicPartition }
func NewWriteTxnMarkersResponseMarkerTopic ¶
func NewWriteTxnMarkersResponseMarkerTopic() WriteTxnMarkersResponseMarkerTopic
NewWriteTxnMarkersResponseMarkerTopic returns a default WriteTxnMarkersResponseMarkerTopic This is a shortcut for creating a struct and calling Default yourself.
func (*WriteTxnMarkersResponseMarkerTopic) Default ¶
func (v *WriteTxnMarkersResponseMarkerTopic) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to WriteTxnMarkersResponseMarkerTopic.
type WriteTxnMarkersResponseMarkerTopicPartition ¶
func NewWriteTxnMarkersResponseMarkerTopicPartition ¶
func NewWriteTxnMarkersResponseMarkerTopicPartition() WriteTxnMarkersResponseMarkerTopicPartition
NewWriteTxnMarkersResponseMarkerTopicPartition returns a default WriteTxnMarkersResponseMarkerTopicPartition This is a shortcut for creating a struct and calling Default yourself.
func (*WriteTxnMarkersResponseMarkerTopicPartition) Default ¶
func (v *WriteTxnMarkersResponseMarkerTopicPartition) Default()
Default sets any default fields. Calling this allows for future compatibility if new fields are added to WriteTxnMarkersResponseMarkerTopicPartition.