pub struct Builder { /* private fields */ }
net
only.Expand description
Builder to configure and construct Gossip
.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn max_message_size(self, size: usize) -> Self
pub fn max_message_size(self, size: usize) -> Self
Sets the maximum message size in bytes.
By default this is 4096
bytes.
Sourcepub fn membership_config(self, config: HyparviewConfig) -> Self
pub fn membership_config(self, config: HyparviewConfig) -> Self
Set the membership configuration.
Sourcepub fn broadcast_config(self, config: PlumtreeConfig) -> Self
pub fn broadcast_config(self, config: PlumtreeConfig) -> Self
Set the broadcast configuration.
Sourcepub fn use_gossip_for_discovery(self, discovery: GossipDiscovery) -> Self
pub fn use_gossip_for_discovery(self, discovery: GossipDiscovery) -> Self
Optionally enable broadcasting and receiving node addresses over gossip.
If you are using a discovery service on your [Endpoint
], and all nodes participating in gossip
are discoverable through this discovery service, you do not need to enable this.
If you are managing node addresses manually, you can create an instance of [GossipDiscovery
] and
add it to both the endpoint and here. Then gossip will include our node’s address info in join
and forward join messages, so that other nodes can contact us through that info.
We will then also collect the address info retrieved via gossip messages and make them available
to the endpoint.