@@ -211,17 +211,17 @@ type ConsumerGroupState int
211211
212212const (
213213 // ConsumerGroupStateUnknown - Unknown ConsumerGroupState
214- ConsumerGroupStateUnknown = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN )
214+ ConsumerGroupStateUnknown ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN
215215 // 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
217217 // 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
219219 // ConsumerGroupStateStable - stable
220- ConsumerGroupStateStable = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_STABLE )
220+ ConsumerGroupStateStable ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_STABLE
221221 // ConsumerGroupStateDead - dead group
222- ConsumerGroupStateDead = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_DEAD )
222+ ConsumerGroupStateDead ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_DEAD
223223 // ConsumerGroupStateEmpty - empty group
224- ConsumerGroupStateEmpty = ConsumerGroupState ( C .RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY )
224+ ConsumerGroupStateEmpty ConsumerGroupState = C .RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY
225225)
226226
227227// String returns the human-readable representation of a consumer_group_state
@@ -431,15 +431,15 @@ type ResourceType int
431431
432432const (
433433 // ResourceUnknown - Unknown
434- ResourceUnknown = ResourceType ( C .RD_KAFKA_RESOURCE_UNKNOWN )
434+ ResourceUnknown ResourceType = C .RD_KAFKA_RESOURCE_UNKNOWN
435435 // ResourceAny - match any resource type (DescribeConfigs)
436- ResourceAny = ResourceType ( C .RD_KAFKA_RESOURCE_ANY )
436+ ResourceAny ResourceType = C .RD_KAFKA_RESOURCE_ANY
437437 // ResourceTopic - Topic
438- ResourceTopic = ResourceType ( C .RD_KAFKA_RESOURCE_TOPIC )
438+ ResourceTopic ResourceType = C .RD_KAFKA_RESOURCE_TOPIC
439439 // ResourceGroup - Group
440- ResourceGroup = ResourceType ( C .RD_KAFKA_RESOURCE_GROUP )
440+ ResourceGroup ResourceType = C .RD_KAFKA_RESOURCE_GROUP
441441 // ResourceBroker - Broker
442- ResourceBroker = ResourceType ( C .RD_KAFKA_RESOURCE_BROKER )
442+ ResourceBroker ResourceType = C .RD_KAFKA_RESOURCE_BROKER
443443)
444444
445445// String returns the human-readable representation of a ResourceType
@@ -469,17 +469,17 @@ type ConfigSource int
469469
470470const (
471471 // 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
473473 // 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
475475 // 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
477477 // 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
479479 // 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
481481 // 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
483483)
484484
485485// String returns the human-readable representation of a ConfigSource type
@@ -531,16 +531,16 @@ type AlterConfigOpType int
531531const (
532532 // AlterConfigOpTypeSet sets/overwrites the configuration
533533 // setting.
534- AlterConfigOpTypeSet = AlterConfigOpType ( C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET )
534+ AlterConfigOpTypeSet AlterConfigOpType = C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET
535535 // AlterConfigOpTypeDelete sets the configuration setting
536536 // 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
538538 // AlterConfigOpTypeAppend appends the value to existing
539539 // configuration settings.
540- AlterConfigOpTypeAppend = AlterConfigOpType ( C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND )
540+ AlterConfigOpTypeAppend AlterConfigOpType = C .RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND
541541 // AlterConfigOpTypeSubtract subtracts the value from
542542 // 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
544544)
545545
546546// String returns the human-readable representation of an AlterOperation
@@ -682,15 +682,15 @@ type ResourcePatternType int
682682
683683const (
684684 // 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
686686 // 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
688688 // ResourcePatternTypeMatch will perform pattern matching
689- ResourcePatternTypeMatch = ResourcePatternType ( C .RD_KAFKA_RESOURCE_PATTERN_MATCH )
689+ ResourcePatternTypeMatch ResourcePatternType = C .RD_KAFKA_RESOURCE_PATTERN_MATCH
690690 // ResourcePatternTypeLiteral matches a literal resource name
691- ResourcePatternTypeLiteral = ResourcePatternType ( C .RD_KAFKA_RESOURCE_PATTERN_LITERAL )
691+ ResourcePatternTypeLiteral ResourcePatternType = C .RD_KAFKA_RESOURCE_PATTERN_LITERAL
692692 // ResourcePatternTypePrefixed matches a prefixed resource name
693- ResourcePatternTypePrefixed = ResourcePatternType ( C .RD_KAFKA_RESOURCE_PATTERN_PREFIXED )
693+ ResourcePatternTypePrefixed ResourcePatternType = C .RD_KAFKA_RESOURCE_PATTERN_PREFIXED
694694)
695695
696696// String returns the human-readable representation of a ResourcePatternType
@@ -720,31 +720,31 @@ type ACLOperation int
720720
721721const (
722722 // 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
724724 // 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
726726 // ACLOperationAll represents all the operations
727- ACLOperationAll = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_ALL )
727+ ACLOperationAll ACLOperation = C .RD_KAFKA_ACL_OPERATION_ALL
728728 // ACLOperationRead a read operation
729- ACLOperationRead = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_READ )
729+ ACLOperationRead ACLOperation = C .RD_KAFKA_ACL_OPERATION_READ
730730 // ACLOperationWrite represents a write operation
731- ACLOperationWrite = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_WRITE )
731+ ACLOperationWrite ACLOperation = C .RD_KAFKA_ACL_OPERATION_WRITE
732732 // ACLOperationCreate represents a create operation
733- ACLOperationCreate = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_CREATE )
733+ ACLOperationCreate ACLOperation = C .RD_KAFKA_ACL_OPERATION_CREATE
734734 // ACLOperationDelete represents a delete operation
735- ACLOperationDelete = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_DELETE )
735+ ACLOperationDelete ACLOperation = C .RD_KAFKA_ACL_OPERATION_DELETE
736736 // ACLOperationAlter represents an alter operation
737- ACLOperationAlter = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_ALTER )
737+ ACLOperationAlter ACLOperation = C .RD_KAFKA_ACL_OPERATION_ALTER
738738 // ACLOperationDescribe represents a describe operation
739- ACLOperationDescribe = ACLOperation ( C .RD_KAFKA_ACL_OPERATION_DESCRIBE )
739+ ACLOperationDescribe ACLOperation = C .RD_KAFKA_ACL_OPERATION_DESCRIBE
740740 // 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
742742 // 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
744744 // 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
746746 // 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
748748)
749749
750750// String returns the human-readable representation of an ACLOperation
@@ -790,13 +790,13 @@ type ACLPermissionType int
790790
791791const (
792792 // 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
794794 // 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
796796 // ACLPermissionTypeDeny disallows access
797- ACLPermissionTypeDeny = ACLPermissionType ( C .RD_KAFKA_ACL_PERMISSION_TYPE_DENY )
797+ ACLPermissionTypeDeny ACLPermissionType = C .RD_KAFKA_ACL_PERMISSION_TYPE_DENY
798798 // ACLPermissionTypeAllow grants access
799- ACLPermissionTypeAllow = ACLPermissionType ( C .RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW )
799+ ACLPermissionTypeAllow ACLPermissionType = C .RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW
800800)
801801
802802// String returns the human-readable representation of an ACLPermissionType
@@ -903,11 +903,11 @@ type ScramMechanism int
903903
904904const (
905905 // ScramMechanismUnknown - Unknown SASL/SCRAM mechanism
906- ScramMechanismUnknown = ScramMechanism ( C .RD_KAFKA_SCRAM_MECHANISM_UNKNOWN )
906+ ScramMechanismUnknown ScramMechanism = C .RD_KAFKA_SCRAM_MECHANISM_UNKNOWN
907907 // 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
909909 // 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
911911)
912912
913913// String returns the human-readable representation of an ScramMechanism
@@ -1000,11 +1000,11 @@ type OffsetSpec int64
10001000
10011001const (
10021002 // 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
10041004 // 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
10061006 // 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
10081008)
10091009
10101010// NewOffsetSpecForTimestamp creates an OffsetSpec corresponding to the timestamp.
0 commit comments