View Source KafkaEx.New.Structs.NodeSelector (kafka_ex v0.14.0)
Defines node selector functions and macros
Summary
Functions
Select the controller for the given consumer group
Select the cluster's controller node
Select first available node
Select a specific node
Select a random node
Select the controller for the given topic and partition
Types
@type t() :: %KafkaEx.New.Structs.NodeSelector{ consumer_group_name: KafkaEx.New.KafkaExAPI.consumer_group_name() | nil, node_id: non_neg_integer() | nil, partition: KafkaEx.New.KafkaExAPI.partition_id() | nil, strategy: valid_strategy(), topic: KafkaEx.New.KafkaExAPI.topic_name() | nil }
@type valid_strategy() ::
:node_id
| :random
| :first_available
| :controller
| :topic_partition
| :consumer_group
Functions
@spec consumer_group(KafkaEx.New.KafkaExAPI.consumer_group_name()) :: t()
Select the controller for the given consumer group
@spec controller() :: t()
Select the cluster's controller node
@spec first_available() :: t()
Select first available node
@spec node_id(KafkaEx.New.KafkaExAPI.node_id()) :: t()
Select a specific node
@spec random() :: t()
Select a random node
@spec topic_partition( KafkaEx.New.KafkaExAPI.topic_name(), KafkaEx.New.KafkaExAPI.partition_id() ) :: t()
Select the controller for the given topic and partition