...

Text file src/github.com/twmb/franz-go/generate/definitions/43_elect_leaders

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

     1// ElectLeadersRequest begins a leader election for all given topic
     2// partitions. This request was added in Kafka 2.2.0 to replace the zookeeper
     3// only option of triggering leader elections before. See KIP-183 for more
     4// details. KIP-460 introduced the ElectionType field with Kafka 2.4.0.
     5ElectLeadersRequest => key 43, max version 2, flexible v2+, admin
     6  // ElectionType is the type of election to conduct. 0 elects the preferred
     7  // replica, 1 elects the first live replica if there are no in-sync replicas
     8  // (i.e., unclean leader election).
     9  ElectionType: int8 // v1+
    10  // Topics is an array of topics and corresponding partitions to
    11  // trigger leader elections for, or null for all.
    12  Topics: nullable[=>]
    13    // Topic is a topic to trigger leader elections for (but only for the
    14    // partitions below).
    15    Topic: string
    16    // Partitions is an array of partitions in a topic to trigger leader
    17    // elections for.
    18    Partitions: [int32]
    19  TimeoutMillis(60000)
    20
    21// ElectLeadersResponse is a response for an ElectLeadersRequest.
    22ElectLeadersResponse =>
    23  ThrottleMillis
    24  // ErrorCode is any error that applies to all partitions.
    25  //
    26  // CLUSTER_AUTHORIZATION_FAILED is returned if the client is not
    27  // authorized to reassign partitions.
    28  ErrorCode: int16 // v1+
    29  // Topics contains leader election results for each requested topic.
    30  Topics: [=>]
    31    // Topic is topic for the given partition results below.
    32    Topic: string
    33    // Partitions contains election results for a topic's partitions.
    34    Partitions: [=>]
    35      // Partition is the partition for this result.
    36      Partition: int32
    37      // ErrorCode is the error code returned for this topic/partition leader
    38      // election.
    39      //
    40      // CLUSTER_AUTHORIZATION_FAILED is returned if the client is not
    41      // authorized to trigger leader elections.
    42      //
    43      // NOT_CONTROLLER is returned if the request was not issued to a Kafka
    44      // controller.
    45      //
    46      // UNKNOWN_TOPIC_OR_PARTITION is returned if the topic/partition does
    47      // not exist on any broker in the cluster (this is slightly different
    48      // from the usual meaning of a single broker not knowing of the topic
    49      // partition).
    50      //
    51      // PREFERRED_LEADER_NOT_AVAILABLE is returned if the preferred leader
    52      // could not be elected (for example, the preferred leader was not in
    53      // the ISR).
    54      ErrorCode: int16
    55      // ErrorMessage is an informative message if the leader election failed.
    56      ErrorMessage: nullable-string

View as plain text