kmsg: commit generated RequestForKey
@@ -5,7 +5,7 @@ import "github.com/twmb/kgo/kbin"
// Code generated by kgo/generate. DO NOT EDIT.
// MaxKey is the maximum key used for any messages in this package.
-// Note that this value may change as Kafka adds more messages.
+// Note that this value will change as Kafka adds more messages.
const MaxKey = 43
// Header is user provided metadata for a record. Kafka does not look at
@@ -7087,3 +7087,100 @@ func (v *ElectPreferredLeadersResponse) ReadFrom(src []byte) error {
}
return b.Complete()
}
+
+// RequestForKey returns the request corresponding to the given request key
+// or nil if the key is unknown.
+func RequestForKey(key int16) Request {
+ switch key {
+ default:
+ return nil
+ case 0:
+ return new(ProduceRequest)
+ case 1:
+ return new(FetchRequest)
+ case 2:
+ return new(ListOffsetsRequest)
+ case 3:
+ return new(MetadataRequest)
+ case 4:
+ return new(LeaderAndISRRequest)
+ case 5:
+ return new(StopReplicaRequest)
+ case 6:
+ return new(UpdateMetadataRequest)
+ case 7:
+ return new(ControlledShutdownRequest)
+ case 8:
+ return new(OffsetCommitRequest)
+ case 9:
+ return new(OffsetFetchRequest)
+ case 10:
+ return new(FindCoordinatorRequest)
+ case 11:
+ return new(JoinGroupRequest)
+ case 12:
+ return new(HeartbeatRequest)
+ case 13:
+ return new(LeaveGroupRequest)
+ case 14:
+ return new(SyncGroupRequest)
+ case 15:
+ return new(DescribeGroupsRequest)
+ case 16:
+ return new(ListGroupsRequest)
+ case 17:
+ return new(SASLHandshakeRequest)
+ case 18:
+ return new(ApiVersionsRequest)
+ case 19:
+ return new(CreateTopicsRequest)
+ case 20:
+ return new(DeleteTopicsRequest)
+ case 21:
+ return new(DeleteRecordsRequest)
+ case 22:
+ return new(InitProducerIDRequest)
+ case 23:
+ return new(OffsetForLeaderEpochRequest)
+ case 24:
+ return new(AddPartitionsToTxnRequest)
+ case 25:
+ return new(AddOffsetsToTxnRequest)
+ case 26:
+ return new(EndTxnRequest)
+ case 27:
+ return new(WriteTxnMarkersRequest)
+ case 28:
+ return new(TxnOffsetCommitRequest)
+ case 29:
+ return new(DescribeACLsRequest)
+ case 30:
+ return new(CreateACLsRequest)
+ case 31:
+ return new(DeleteACLsRequest)
+ case 32:
+ return new(DescribeConfigsRequest)
+ case 33:
+ return new(AlterConfigsRequest)
+ case 34:
+ return new(AlterReplicaLogDirsRequest)
+ case 35:
+ return new(DescribeLogDirsRequest)
+ case 36:
+ return new(SASLAuthenticateRequest)
+ case 37:
+ return new(CreatePartitionsRequest)
+ case 38:
+ return new(CreateDelegationTokenRequest)
+ case 39:
+ return new(RenewDelegationTokenRequest)
+ case 40:
+ return new(ExpireDelegationTokenRequest)
+ case 41:
+ return new(DescribeDelegationTokenRequest)
+ case 42:
+ return new(DeleteGroupsRequests)
+ case 43:
+ return new(ElectPreferredLeadersRequest)
+ }
+}
