@@ -211,17 +211,17 @@ type ConsumerGroupState int
211
211
212
212
const (
213
213
// ConsumerGroupStateUnknown - Unknown ConsumerGroupState
214
- ConsumerGroupStateUnknown = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN )
214
+ ConsumerGroupStateUnknown ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN
215
215
// ConsumerGroupStatePreparingRebalance - preparing rebalance
216
- ConsumerGroupStatePreparingRebalance = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE )
216
+ ConsumerGroupStatePreparingRebalance ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE
217
217
// ConsumerGroupStateCompletingRebalance - completing rebalance
218
- ConsumerGroupStateCompletingRebalance = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE )
218
+ ConsumerGroupStateCompletingRebalance ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE
219
219
// ConsumerGroupStateStable - stable
220
- ConsumerGroupStateStable = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_STABLE )
220
+ ConsumerGroupStateStable ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_STABLE
221
221
// ConsumerGroupStateDead - dead group
222
- ConsumerGroupStateDead = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_DEAD )
222
+ ConsumerGroupStateDead ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_DEAD
223
223
// ConsumerGroupStateEmpty - empty group
224
- ConsumerGroupStateEmpty = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY )
224
+ ConsumerGroupStateEmpty ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY
225
225
)
226
226
227
227
// String returns the human-readable representation of a consumer_group_state
@@ -431,15 +431,15 @@ type ResourceType int
431
431
432
432
const (
433
433
// ResourceUnknown - Unknown
434
- ResourceUnknown = ResourceType ( C .RD_KAFKA_RESOURCE_UNKNOWN )
434
+ ResourceUnknown ResourceType = C .RD_KAFKA_RESOURCE_UNKNOWN
435
435
// ResourceAny - match any resource type (DescribeConfigs)
436
- ResourceAny = ResourceType ( C .RD_KAFKA_RESOURCE_ANY )
436
+ ResourceAny ResourceType = C .RD_KAFKA_RESOURCE_ANY
437
437
// ResourceTopic - Topic
438
- ResourceTopic = ResourceType ( C .RD_KAFKA_RESOURCE_TOPIC )
438
+ ResourceTopic ResourceType = C .RD_KAFKA_RESOURCE_TOPIC
439
439
// ResourceGroup - Group
440
- ResourceGroup = ResourceType ( C .RD_KAFKA_RESOURCE_GROUP )
440
+ ResourceGroup ResourceType = C .RD_KAFKA_RESOURCE_GROUP
441
441
// ResourceBroker - Broker
442
- ResourceBroker = ResourceType ( C .RD_KAFKA_RESOURCE_BROKER )
442
+ ResourceBroker ResourceType = C .RD_KAFKA_RESOURCE_BROKER
443
443
)
444
444
445
445
// String returns the human-readable representation of a ResourceType
@@ -469,17 +469,17 @@ type ConfigSource int
469
469
470
470
const (
471
471
// ConfigSourceUnknown is the default value
472
- ConfigSourceUnknown = ConfigSource ( C .RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG )
472
+ ConfigSourceUnknown ConfigSource = C .RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG
473
473
// ConfigSourceDynamicTopic is dynamic topic config that is configured for a specific topic
474
- ConfigSourceDynamicTopic = ConfigSource ( C .RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG )
474
+ ConfigSourceDynamicTopic ConfigSource = C .RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG
475
475
// ConfigSourceDynamicBroker is dynamic broker config that is configured for a specific broker
476
- ConfigSourceDynamicBroker = ConfigSource ( C .RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG )
476
+ ConfigSourceDynamicBroker ConfigSource = C .RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG
477
477
// ConfigSourceDynamicDefaultBroker is dynamic broker config that is configured as default for all brokers in the cluster
478
- ConfigSourceDynamicDefaultBroker = ConfigSource ( C .RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG )
478
+ ConfigSourceDynamicDefaultBroker ConfigSource = C .RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG
479
479
// ConfigSourceStaticBroker is static broker config provided as broker properties at startup (e.g. from server.properties file)
480
- ConfigSourceStaticBroker = ConfigSource ( C .RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG )
480
+ ConfigSourceStaticBroker ConfigSource = C .RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG
481
481
// ConfigSourceDefault is built-in default configuration for configs that have a default value
482
- ConfigSourceDefault = ConfigSource ( C .RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG )
482
+ ConfigSourceDefault ConfigSource = C .RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG
483
483
)
484
484
485
485
// String returns the human-readable representation of a ConfigSource type
@@ -531,16 +531,16 @@ type AlterConfigOpType int
531
531
const (
532
532
// AlterConfigOpTypeSet sets/overwrites the configuration
533
533
// setting.
534
- AlterConfigOpTypeSet = AlterConfigOpType ( C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET )
534
+ AlterConfigOpTypeSet AlterConfigOpType = C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET
535
535
// AlterConfigOpTypeDelete sets the configuration setting
536
536
// to default or NULL.
537
- AlterConfigOpTypeDelete = AlterConfigOpType ( C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_DELETE )
537
+ AlterConfigOpTypeDelete AlterConfigOpType = C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_DELETE
538
538
// AlterConfigOpTypeAppend appends the value to existing
539
539
// configuration settings.
540
- AlterConfigOpTypeAppend = AlterConfigOpType ( C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND )
540
+ AlterConfigOpTypeAppend AlterConfigOpType = C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND
541
541
// AlterConfigOpTypeSubtract subtracts the value from
542
542
// existing configuration settings.
543
- AlterConfigOpTypeSubtract = AlterConfigOpType ( C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_SUBTRACT )
543
+ AlterConfigOpTypeSubtract AlterConfigOpType = C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_SUBTRACT
544
544
)
545
545
546
546
// String returns the human-readable representation of an AlterOperation
@@ -682,15 +682,15 @@ type ResourcePatternType int
682
682
683
683
const (
684
684
// ResourcePatternTypeUnknown is a resource pattern type not known or not set.
685
- ResourcePatternTypeUnknown = ResourcePatternType ( C .RD_KAFKA_RESOURCE_PATTERN_UNKNOWN )
685
+ ResourcePatternTypeUnknown ResourcePatternType = C .RD_KAFKA_RESOURCE_PATTERN_UNKNOWN
686
686
// ResourcePatternTypeAny matches any resource, used for lookups.
687
- ResourcePatternTypeAny = ResourcePatternType ( C .RD_KAFKA_RESOURCE_PATTERN_ANY )
687
+ ResourcePatternTypeAny ResourcePatternType = C .RD_KAFKA_RESOURCE_PATTERN_ANY
688
688
// ResourcePatternTypeMatch will perform pattern matching
689
- ResourcePatternTypeMatch = ResourcePatternType ( C .RD_KAFKA_RESOURCE_PATTERN_MATCH )
689
+ ResourcePatternTypeMatch ResourcePatternType = C .RD_KAFKA_RESOURCE_PATTERN_MATCH
690
690
// ResourcePatternTypeLiteral matches a literal resource name
691
- ResourcePatternTypeLiteral = ResourcePatternType ( C .RD_KAFKA_RESOURCE_PATTERN_LITERAL )
691
+ ResourcePatternTypeLiteral ResourcePatternType = C .RD_KAFKA_RESOURCE_PATTERN_LITERAL
692
692
// ResourcePatternTypePrefixed matches a prefixed resource name
693
- ResourcePatternTypePrefixed = ResourcePatternType ( C .RD_KAFKA_RESOURCE_PATTERN_PREFIXED )
693
+ ResourcePatternTypePrefixed ResourcePatternType = C .RD_KAFKA_RESOURCE_PATTERN_PREFIXED
694
694
)
695
695
696
696
// String returns the human-readable representation of a ResourcePatternType
@@ -720,31 +720,31 @@ type ACLOperation int
720
720
721
721
const (
722
722
// ACLOperationUnknown represents an unknown or unset operation
723
- ACLOperationUnknown = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_UNKNOWN )
723
+ ACLOperationUnknown ACLOperation = C .RD_KAFKA_ACL_OPERATION_UNKNOWN
724
724
// ACLOperationAny in a filter, matches any ACLOperation
725
- ACLOperationAny = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_ANY )
725
+ ACLOperationAny ACLOperation = C .RD_KAFKA_ACL_OPERATION_ANY
726
726
// ACLOperationAll represents all the operations
727
- ACLOperationAll = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_ALL )
727
+ ACLOperationAll ACLOperation = C .RD_KAFKA_ACL_OPERATION_ALL
728
728
// ACLOperationRead a read operation
729
- ACLOperationRead = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_READ )
729
+ ACLOperationRead ACLOperation = C .RD_KAFKA_ACL_OPERATION_READ
730
730
// ACLOperationWrite represents a write operation
731
- ACLOperationWrite = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_WRITE )
731
+ ACLOperationWrite ACLOperation = C .RD_KAFKA_ACL_OPERATION_WRITE
732
732
// ACLOperationCreate represents a create operation
733
- ACLOperationCreate = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_CREATE )
733
+ ACLOperationCreate ACLOperation = C .RD_KAFKA_ACL_OPERATION_CREATE
734
734
// ACLOperationDelete represents a delete operation
735
- ACLOperationDelete = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_DELETE )
735
+ ACLOperationDelete ACLOperation = C .RD_KAFKA_ACL_OPERATION_DELETE
736
736
// ACLOperationAlter represents an alter operation
737
- ACLOperationAlter = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_ALTER )
737
+ ACLOperationAlter ACLOperation = C .RD_KAFKA_ACL_OPERATION_ALTER
738
738
// ACLOperationDescribe represents a describe operation
739
- ACLOperationDescribe = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_DESCRIBE )
739
+ ACLOperationDescribe ACLOperation = C .RD_KAFKA_ACL_OPERATION_DESCRIBE
740
740
// ACLOperationClusterAction represents a cluster action operation
741
- ACLOperationClusterAction = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION )
741
+ ACLOperationClusterAction ACLOperation = C .RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION
742
742
// ACLOperationDescribeConfigs represents a describe configs operation
743
- ACLOperationDescribeConfigs = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS )
743
+ ACLOperationDescribeConfigs ACLOperation = C .RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS
744
744
// ACLOperationAlterConfigs represents an alter configs operation
745
- ACLOperationAlterConfigs = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS )
745
+ ACLOperationAlterConfigs ACLOperation = C .RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS
746
746
// ACLOperationIdempotentWrite represents an idempotent write operation
747
- ACLOperationIdempotentWrite = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE )
747
+ ACLOperationIdempotentWrite ACLOperation = C .RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE
748
748
)
749
749
750
750
// String returns the human-readable representation of an ACLOperation
@@ -790,13 +790,13 @@ type ACLPermissionType int
790
790
791
791
const (
792
792
// ACLPermissionTypeUnknown represents an unknown ACLPermissionType
793
- ACLPermissionTypeUnknown = ACLPermissionType ( C .RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN )
793
+ ACLPermissionTypeUnknown ACLPermissionType = C .RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN
794
794
// ACLPermissionTypeAny in a filter, matches any ACLPermissionType
795
- ACLPermissionTypeAny = ACLPermissionType ( C .RD_KAFKA_ACL_PERMISSION_TYPE_ANY )
795
+ ACLPermissionTypeAny ACLPermissionType = C .RD_KAFKA_ACL_PERMISSION_TYPE_ANY
796
796
// ACLPermissionTypeDeny disallows access
797
- ACLPermissionTypeDeny = ACLPermissionType ( C .RD_KAFKA_ACL_PERMISSION_TYPE_DENY )
797
+ ACLPermissionTypeDeny ACLPermissionType = C .RD_KAFKA_ACL_PERMISSION_TYPE_DENY
798
798
// ACLPermissionTypeAllow grants access
799
- ACLPermissionTypeAllow = ACLPermissionType ( C .RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW )
799
+ ACLPermissionTypeAllow ACLPermissionType = C .RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW
800
800
)
801
801
802
802
// String returns the human-readable representation of an ACLPermissionType
@@ -903,11 +903,11 @@ type ScramMechanism int
903
903
904
904
const (
905
905
// ScramMechanismUnknown - Unknown SASL/SCRAM mechanism
906
- ScramMechanismUnknown = ScramMechanism ( C .RD_KAFKA_SCRAM_MECHANISM_UNKNOWN )
906
+ ScramMechanismUnknown ScramMechanism = C .RD_KAFKA_SCRAM_MECHANISM_UNKNOWN
907
907
// ScramMechanismSHA256 - SCRAM-SHA-256 mechanism
908
- ScramMechanismSHA256 = ScramMechanism ( C .RD_KAFKA_SCRAM_MECHANISM_SHA_256 )
908
+ ScramMechanismSHA256 ScramMechanism = C .RD_KAFKA_SCRAM_MECHANISM_SHA_256
909
909
// ScramMechanismSHA512 - SCRAM-SHA-512 mechanism
910
- ScramMechanismSHA512 = ScramMechanism ( C .RD_KAFKA_SCRAM_MECHANISM_SHA_512 )
910
+ ScramMechanismSHA512 ScramMechanism = C .RD_KAFKA_SCRAM_MECHANISM_SHA_512
911
911
)
912
912
913
913
// String returns the human-readable representation of an ScramMechanism
@@ -1000,11 +1000,11 @@ type OffsetSpec int64
1000
1000
1001
1001
const (
1002
1002
// MaxTimestampOffsetSpec is used to describe the offset with the Max Timestamp which may be different then LatestOffsetSpec as Timestamp can be set client side.
1003
- MaxTimestampOffsetSpec = OffsetSpec ( C .RD_KAFKA_OFFSET_SPEC_MAX_TIMESTAMP )
1003
+ MaxTimestampOffsetSpec OffsetSpec = C .RD_KAFKA_OFFSET_SPEC_MAX_TIMESTAMP
1004
1004
// EarliestOffsetSpec is used to describe the earliest offset for the TopicPartition.
1005
- EarliestOffsetSpec = OffsetSpec ( C .RD_KAFKA_OFFSET_SPEC_EARLIEST )
1005
+ EarliestOffsetSpec OffsetSpec = C .RD_KAFKA_OFFSET_SPEC_EARLIEST
1006
1006
// LatestOffsetSpec is used to describe the latest offset for the TopicPartition.
1007
- LatestOffsetSpec = OffsetSpec ( C .RD_KAFKA_OFFSET_SPEC_LATEST )
1007
+ LatestOffsetSpec OffsetSpec = C .RD_KAFKA_OFFSET_SPEC_LATEST
1008
1008
)
1009
1009
1010
1010
// NewOffsetSpecForTimestamp creates an OffsetSpec corresponding to the timestamp.
0 commit comments