github.com/QuangHoangHao/kafka-go@v0.4.36/resource.go (about)

     1  package kafka
     2  
     3  // https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/resource/ResourceType.java
     4  type ResourceType int8
     5  
     6  const (
     7  	ResourceTypeUnknown ResourceType = 0
     8  	ResourceTypeAny     ResourceType = 1
     9  	ResourceTypeTopic   ResourceType = 2
    10  	ResourceTypeGroup   ResourceType = 3
    11  	// See https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/config/ConfigResource.java#L36
    12  	ResourceTypeBroker          ResourceType = 4
    13  	ResourceTypeCluster         ResourceType = 4
    14  	ResourceTypeTransactionalID ResourceType = 5
    15  	ResourceTypeDelegationToken ResourceType = 6
    16  )
    17  
    18  // https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/resource/PatternType.java
    19  type PatternType int8
    20  
    21  const (
    22  	// PatternTypeUnknown represents any PatternType which this client cannot
    23  	// understand.
    24  	PatternTypeUnknown PatternType = 0
    25  	// PatternTypeAny matches any resource pattern type.
    26  	PatternTypeAny PatternType = 1
    27  	// PatternTypeMatch perform pattern matching.
    28  	PatternTypeMatch PatternType = 2
    29  	// PatternTypeLiteral represents a literal name.
    30  	// A literal name defines the full name of a resource, e.g. topic with name
    31  	// 'foo', or group with name 'bob'.
    32  	PatternTypeLiteral PatternType = 3
    33  	// PatternTypePrefixed represents a prefixed name.
    34  	// A prefixed name defines a prefix for a resource, e.g. topics with names
    35  	// that start with 'foo'.
    36  	PatternTypePrefixed PatternType = 4
    37  )