Struct exonum::node::Node
[−]
[src]
pub struct Node { /* fields omitted */ }
Node that contains handler (NodeHandler
) and NodeApiConfig
.
Methods
impl Node
[src]
pub fn new<D: Into<Arc<Database>>>(
db: D,
services: Vec<Box<Service>>,
node_cfg: NodeConfig
) -> Self
[src]
db: D,
services: Vec<Box<Service>>,
node_cfg: NodeConfig
) -> Self
Creates node for the given services and node configuration.
pub fn run_handler(self) -> Result<()>
[src]
Launches only consensus messages handler.
This may be used if you want to customize api with the ApiContext
.
pub fn run(self) -> Result<()>
[src]
A generic implementation that launches Node
and optionally creates threads
for public and private api handlers.
Explorer api prefix is /api/explorer
Public api prefix is /api/services/{service_name}
Private api prefix is /api/services/{service_name}
pub fn blockchain(&self) -> Blockchain
[src]
Returns Blockchain
instance.
pub fn state(&self) -> &State
[src]
Returns State
.
pub fn handler(&self) -> &NodeHandler
[src]
Returns NodeHandler
.
pub fn channel(&self) -> ApiSender
[src]
Returns channel.