Module libp2p_group_gossip

Data Types

connection_kind()


connection_kind() = peerbook | seed | inbound

handler()


handler() = {Module::atom(), State::any()}

opt()


opt() = {peerbook_connections, pos_integer()} | {drop_timeout, pos_integer()} | {stream_clients, [libp2p_group_worker:stream_client_spec()]} | {seed_nodes, [MultiAddr::string()]}

Function Index

add_handler/3
connected_addrs/2
remove_handler/2
send/3Send the given data to all members of the group for the given gossip key.

Function Details

add_handler/3


add_handler(Pid::pid(), Key::string(), Handler::handler()) -> ok


connected_addrs/2


connected_addrs(Pid::pid(), WorkerKind::connection_kind() | all) -> [string()]


remove_handler/2


remove_handler(Pid::pid(), Key::string()) -> ok


send/3


send(Pid::pid(), Key::string(), Data::iodata()) -> ok


Send the given data to all members of the group for the given gossip key. The implementation of the group determines the strategy used for delivery. Delivery is best effort.