Struct glycos::net::run::NodeBuilder [−][src]
pub struct NodeBuilder {
pub db: PersistentGraph,
pub listen_on: Vec<Multiaddr>,
pub key_pair: Keypair,
}Expand description
Builder pattern for a Glycos-infused [Swarm] and [ServerControl].
Example
use glycos::net::NodeBuilder;
let swarm = NodeBuilder::default()
.listen_port(10_000) // Listen on [::]:10000
// .graph(storage) // If you want a custom storage location
.into_facade()
.await
.expect("Start node");Fields
db: PersistentGraphlisten_on: Vec<Multiaddr>key_pair: KeypairImplementations
Replaces all listeners with listeners on a specific port.
