1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//! [Raft]アルゴリズムに基づく分散複製ログを提供するクレート.
//!
//! このクレート自体は、アルゴリズム実装のみに専念しており、
//! 実際に動作するシステムで利用するためには、`Io`トレイトの
//! 実装を別個用意する必要がある.
//!
//! [Raft]: https://raft.github.io/
#![warn(missing_docs)]
#[cfg(test)]
extern crate fibers;
extern crate futures;
extern crate prometrics;
#[macro_use]
extern crate trackable;

pub use error::{Error, ErrorKind};
pub use io::Io;
pub use replicated_log::{Event, ReplicatedLog};

pub mod cluster;
pub mod election;
pub mod log;
pub mod message;
pub mod metrics;
pub mod node;

mod error;
mod io;
mod node_state;
mod replicated_log;
mod test_util;

/// クレート固有の`Result`型.
pub type Result<T> = ::std::result::Result<T, Error>;