kayrock v0.1.0 Kayrock.Client.ClusterMetadata View Source

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

Link to this section Summary

Link to this section Types

Link to this type

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

Link to this type

t() View Source
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
select_node(t(), Kayrock.node_selector()) ::
  {:ok, Kayrock.node_id()} | {:error, node_select_error()}