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
54
//! Core features of **tricorder**.
//!
//! **tricorder** uses an inventory to configure which hosts it needs to connect
//! to and which data are associated to those specific hosts.
//!
//! This inventory can be built from a TOML document:
//!
//! ```toml
//! [[hosts]]
//!
//! id = "localhost"
//! address = "localhost:22"
//! user = "root"
//! tags = ["local"]
//! vars = { foo = "bar" }
//! ```
//!
//! A JSON document:
//!
//! ```json
//! {"hosts": [
//! {
//! "id": "localhost",
//! "address": "localhost:22",
//! "user": "root",
//! "tags": ["local"],
//! "vars": {"foo": "bar"}
//! }
//! ]}
//! ```
//!
//! Or directly via the Rust API:
//!
//! ```rust
//! use tricorder::prelude::{Inventory, Host};
//! use serde_json::json;
//!
//! let inventory = Inventory::new()
//! .add_host(
//! Host::new(Host::id("localhost").unwrap(), "localhost:22".to_string())
//! .set_user("root".to_string())
//! .add_tag(Host::tag("local").unwrap())
//! .set_var("foo".to_string(), json!("bar"))
//! .to_owned()
//! )
//! .to_owned();
//! ```
pub use ;