Kayrock.Client.ClusterMetadata (kayrock v0.1.12) View Source

Encapsulates what we know about the state of a Kafka broker cluster

Link to this section Summary

Link to this section Types

Specs

node_select_error() :: :no_such_node | :no_such_topic | :no_such_partition

Specs

t() :: %Kayrock.Client.ClusterMetadata{
  brokers: term(),
  controller_id: term(),
  topics: term()
}

Link to this section Functions

Link to this function

broker_by_node_id(cluster_metadata, node_id)

View Source
Link to this function

from_metadata_v1_response(metadata)

View Source
Link to this function

get_and_update_broker(cluster_metadata, node_id, cb)

View Source
Link to this function

known_topics(cluster_metadata)

View Source
Link to this function

merge_brokers(old_cluster_metadata, new_cluster_metadata)

View Source
Link to this function

select_node(cluster_metadata, node_id)

View Source

Specs

select_node(t(), Kayrock.node_selector()) ::
  {:ok, Kayrock.node_id()} | {:error, node_select_error()}