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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Dynomite is a distributed replication layer for Redis and Memcached
//! datastores. This crate provides the engine as a library so it can be
//! embedded in another Rust program, and is also driven by the `dynomited`
//! binary as a standalone server.
//!
//! # Embedding
//!
//! The public embedding API lives in [`embed`]. Build a [`Server`] with
//! [`ServerBuilder`] and drive it via the returned [`ServerHandle`]:
//!
//! ```no_run
//! use dynomite::{Server, ServerBuilder};
//! use dynomite::conf::DataStore;
//! # tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap().block_on(async {
//! let server = ServerBuilder::new("dyn_o_mite")
//! .listen("127.0.0.1:0".parse().unwrap())
//! .dyn_listen("127.0.0.1:0".parse().unwrap())
//! .data_store(DataStore::Redis)
//! .servers(vec![dynomite::conf::ConfServer::parse("127.0.0.1:6379:1").unwrap()])
//! .tokens_str("0")
//! .build()
//! .unwrap();
//! let handle = server.start().await.unwrap();
//! handle.shutdown().await.unwrap();
//! # });
//! ```
//!
//! The full reference manual lives in `docs/book/`. See the [`embed`]
//! module for the complete embedding cookbook.
pub use crate;
pub use crate;