config() = kpro_connection:config()
connection() = kpro:connection()
coordinator_type() = kpro:coordinator_type()
endpoint() = kpro:endpoint()
group_id() = kpro:group_id()
partition() = kpro:partition()
topic() = kpro:topic()
transactional_id() = kpro:transactional_id()
connect_any/2 | Connect to any of the endpoints in the given list. |
connect_controller/3 | Conect to the controller broker of the kafka cluster. |
connect_coordinator/3 | Connect group or transaction coordinator. |
connect_partition_leader/5 | Connect partition leader. |
discover_coordinator/4 | Discover group or transactional coordinator. |
discover_partition_leader/4 | Discover partition leader endpoint. |
get_api_versions/1 | Qury API version ranges using the given kpro_connection pid. |
get_api_vsn_range/2 | Get API version range. |
with_connection/3 | Evaluate given function with a connection to any of the nodes in in the given endpoints. |
connect_any(Endpoints0::[endpoint()], Config::config()) -> {ok, connection()} | {error, any()}
Connect to any of the endpoints in the given list.
connect_controller(Bootstrap::connection() | [endpoint()], Config::config(), Opts::#{timeout => timeout()}) -> {ok, connection()} | {error, any()}
Conect to the controller broker of the kafka cluster.
connect_coordinator(Bootstrap::connection() | [endpoint()], Config::config(), Args::#{type => kpro:coordinator_type(), id => binary(), timeout => timeout()}) -> {ok, connection()} | {error, any()}
Connect group or transaction coordinator. If the first arg is not a connection pid but a list of bootstrapping endpoints, it will frist try to connect to any of the nodes NOTE: 'txn' type only applicable to kafka 0.11 or later
connect_partition_leader(Bootstrap::connection() | [endpoint()], Config::config(), Topic::topic(), Partition::partition(), Opts::#{timeout => timeout()}) -> {ok, connection()} | {error, any()}
Connect partition leader. If the fist arg is not an already established metadata connection but a bootstrapping endpoint list, this function will first try to establish a temp connection to any of the bootstrapping endpoints. Then send metadata request to discover partition leader broker Finally connect to the leader broker.
discover_coordinator(Connection::connection(), Type::coordinator_type(), Id::group_id() | transactional_id(), Timeout::timeout()) -> {ok, endpoint()} | {error, any()}
Discover group or transactional coordinator.
discover_partition_leader(Connection::connection(), Topic::topic(), Partition::partition(), Timeout::timeout()) -> {ok, endpoint()} | {error, any()}
Discover partition leader endpoint.
get_api_versions(Connection::connection()) -> {ok, kpro:vsn_ranges()} | {error, any()}
Qury API version ranges using the given kpro_connection
pid.
The return value is an intersection of queried version ranges
and version ranges supported in THIS library.
get_api_vsn_range(Connection::connection(), API::kpro:api()) -> {ok, kpro:vsn_range()} | {error, any()}
Get API version range.
with_connection(Endpoints::[endpoint()], Config::config(), Fun::fun((connection()) -> Return)) -> Return
Evaluate given function with a connection to any of the nodes in in the given endpoints. Raise a 'throw' exception if failed to connect all endpoints.
Generated by EDoc