pub struct Config {
pub allow_public_space: bool,
pub my_pub: Option<String>,
pub broadcast_buffer_size: usize,
pub ice_servers: Vec<String>,
}Expand description
Configuration for a Node and its associated adapters.
Controls public space access, broadcast channel sizing, and WebRTC ICE server configuration.
Fields§
§allow_public_space: boolWhether to accept writes to public space (non-user-owned nodes).
When true (default), the node accepts puts to any node ID. When
false, only content-addressed (signed) data and user-owned nodes
are accepted — matching Gun.js opt.enforce semantics.
my_pub: Option<String>Public key to prioritize for this node (format: x.y).
When set, the node will preferentially cache data owned by this public key. Used for user-authenticated nodes.
broadcast_buffer_size: usizeBuffer size for broadcast channels used by on() and map().
Defaults to 4096. Increase for high-throughput scenarios; decrease to save memory per active subscription.
ice_servers: Vec<String>STUN/TURN servers for WebRTC ICE negotiation.
Defaults to Google’s public STUN server. Only used when the
webrtc feature is enabled.