...

Text file src/github.com/twmb/franz-go/generate/definitions/03_metadata

Documentation: github.com/twmb/franz-go/generate/definitions

     1// MetadataRequest requests metadata from Kafka.
     2MetadataRequest => key 3, max version 12, flexible v9+
     3  // Topics is a list of topics to return metadata about. If this is null
     4  // in v1+, all topics are included. If this is empty, no topics are.
     5  // For v0 (<Kafka 0.10.0.0), if this is empty, all topics are included.
     6  Topics: nullable-v1+[=>]
     7    // The topic ID. Only one of either topic ID or topic name should be used.
     8    // If using the topic name, this should just be the default empty value.
     9    TopicID: uuid // v10+
    10    // Topic is the topic to request metadata for. Version 10 switched this
    11    // from a string to a nullable string; if using a topic ID, this field
    12    // should be null.
    13    Topic: nullable-string-v10+
    14  // AllowAutoTopicCreation, introduced in Kafka 0.11.0.0, allows topic
    15  // auto creation of the topics in this request if they do not exist.
    16  AllowAutoTopicCreation: bool // v4+
    17  // IncludeClusterAuthorizedOperations, introduced in Kakfa 2.3.0, specifies
    18  // whether to return a bitfield of AclOperations that this client can perform
    19  // on the cluster. See KIP-430 for more details.
    20  //
    21  // This field was removed in Kafka 2.8.0 in favor of the new DescribeClusterRequest.
    22  IncludeClusterAuthorizedOperations: bool // v8-v10
    23  // IncludeTopicAuthorizedOperations, introduced in Kakfa 2.3.0, specifies
    24  // whether to return a bitfield of AclOperations that this client can perform
    25  // on individual topics. See KIP-430 for more details.
    26  //
    27  // This field was removed in Kafka 2.8.0 in favor of the new DescribeClusterRequest.
    28  IncludeTopicAuthorizedOperations: bool // v8+
    29
    30// MetadataResponse is returned from a MetdataRequest.
    31MetadataResponse =>
    32  ThrottleMillis(6) // v3+
    33  // Brokers is a set of alive Kafka brokers.
    34  Brokers: [=>]
    35    // NodeID is the node ID of a Kafka broker.
    36    NodeID: int32
    37    // Host is the hostname of a Kafka broker.
    38    Host: string
    39    // Port is the port of a Kafka broker.
    40    Port: int32
    41    // Rack is the rack this Kafka broker is in.
    42    Rack: nullable-string // v1+
    43  // ClusterID, proposed in KIP-78 and introduced in Kafka 0.10.1.0, is a
    44  // unique string specifying the cluster that the replying Kafka belongs to.
    45  ClusterID: nullable-string // v2+
    46  // ControllerID is the ID of the controller broker (the admin broker).
    47  ControllerID: int32(-1) // v1+
    48  // Topics contains metadata about each topic requested in the
    49  // MetadataRequest.
    50  Topics: [=>]
    51    // ErrorCode is any error for a topic in a metadata request.
    52    //
    53    // TOPIC_AUTHORIZATION_FAILED is returned if the client is not authorized
    54    // to describe the topic, or if the metadata request specified topic auto
    55    // creation, the topic did not exist, and the user lacks permission to create.
    56    //
    57    // UNKNOWN_TOPIC_OR_PARTITION is returned if a topic does not exist and
    58    // the request did not specify autocreation.
    59    //
    60    // LEADER_NOT_AVAILABLE is returned if a new topic is created successfully
    61    // (since there is no leader on an immediately new topic).
    62    //
    63    // There can be a myriad of other errors for unsuccessful topic creation.
    64    ErrorCode: int16
    65    // Topic is the topic this metadata corresponds to.
    66    Topic: nullable-string-v12+
    67    // The topic ID.
    68    TopicID: uuid // v10+
    69    // IsInternal signifies whether this topic is a Kafka internal topic.
    70    IsInternal: bool // v1+
    71    // Partitions contains metadata about partitions for a topic.
    72    Partitions: [=>]
    73      // ErrorCode is any error for a partition in topic metadata.
    74      //
    75      // LEADER_NOT_AVAILABLE is returned if a leader is unavailable for this
    76      // partition. For v0 metadata responses, this is also returned if a
    77      // partition leader's listener does not exist.
    78      //
    79      // LISTENER_NOT_FOUND is returned if a leader ID is known but the
    80      // listener for it is not (v1+).
    81      //
    82      // REPLICA_NOT_AVAILABLE is returned in v0 responses if any replica is
    83      // unavailable.
    84      //
    85      // UNKNOWN_TOPIC_ID is returned if using a topic ID and the ID does not
    86      // exist.
    87      ErrorCode: int16
    88      // Partition is a partition number for a topic.
    89      Partition: int32
    90      // Leader is the broker leader for this partition. This will be -1
    91      // on leader / listener error.
    92      Leader: int32
    93      // LeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0 is the
    94      // epoch of the broker leader.
    95      LeaderEpoch: int32(-1) // v7+
    96      // Replicas returns all broker IDs containing replicas of this partition.
    97      Replicas: [int32]
    98      // ISR returns all broker IDs of in-sync replicas of this partition.
    99      ISR: [int32]
   100      // OfflineReplicas, proposed in KIP-112 and introduced in Kafka 1.0,
   101      // returns all offline broker IDs that should be replicating this partition.
   102      OfflineReplicas: [int32] // v5+
   103    // AuthorizedOperations, proposed in KIP-430 and introduced in Kafka 2.3.0,
   104    // is a bitfield (corresponding to AclOperation) containing which operations
   105    // the client is allowed to perform on this topic.
   106    // This is only returned if requested.
   107    AuthorizedOperations: int32(-2147483648) // v8+
   108  // AuthorizedOperations is a bitfield containing which operations the client
   109  // is allowed to perform on this cluster.
   110  AuthorizedOperations: int32(-2147483648) // v8-v10

View as plain text