From 438906a123854564fd78cda7923dd8d8a6603e84 Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Tue, 18 Jun 2019 15:29:57 -0700 Subject: [PATCH 01/12] [WIP] Composite EC2 Plugin for Metadata Tags also will be forthcoming, but in a different PR. --- src/facts.rs | 1 + src/facts/plugins.rs | 1 + src/facts/plugins/ec2.rs | 40 +++++++++++++++++++++++++++++++ src/facts/plugins/ec2/metadata.rs | 30 +++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 src/facts/plugins/ec2.rs create mode 100644 src/facts/plugins/ec2/metadata.rs diff --git a/src/facts.rs b/src/facts.rs index cc60897..abf758c 100644 --- a/src/facts.rs +++ b/src/facts.rs @@ -53,6 +53,7 @@ impl Default for Facts { // install plugins f.register("basic", Box::new(plugins::basic::BasicPlugin::new())); + f.register("ec2", Box::new(plugins::ec2::Ec2Plugin::new())); f.register("env", Box::new(plugins::env::EnvPlugin::new())); f diff --git a/src/facts/plugins.rs b/src/facts/plugins.rs index a432e35..0db26c5 100644 --- a/src/facts/plugins.rs +++ b/src/facts/plugins.rs @@ -1,2 +1,3 @@ pub mod basic; +pub mod ec2; pub mod env; diff --git a/src/facts/plugins/ec2.rs b/src/facts/plugins/ec2.rs new file mode 100644 index 0000000..a9d4014 --- /dev/null +++ b/src/facts/plugins/ec2.rs @@ -0,0 +1,40 @@ +mod metadata; + +use crate::facts::FactPlugin; +use crate::facts::FactSet; + +use serde_json::Value; + +use std::default::Default; + +use std::io; + +/// A fact plugin for EC2-related data. +/// +/// This plugin will produce EC2 metadata and EC2 tag facts. +pub struct Ec2Plugin; + +impl Ec2Plugin { + pub fn new() -> Self { + Self::default() + } +} + +impl Default for Ec2Plugin { + fn default() -> Self { + Self + } +} + +impl FactPlugin for Ec2Plugin { + fn discover(&self) -> Result { + let mut r = FactSet::new(); + let meta = metadata::Ec2MetadataPlugin::new(); + + // if ec2 metadata discovery fails, then we return that failure and ec2 facts are not + // returned + r.insert("metadata".to_string(), Value::Object(meta.discover()?)); + + Ok(r) + } +} diff --git a/src/facts/plugins/ec2/metadata.rs b/src/facts/plugins/ec2/metadata.rs new file mode 100644 index 0000000..22bf5df --- /dev/null +++ b/src/facts/plugins/ec2/metadata.rs @@ -0,0 +1,30 @@ +use crate::facts::FactPlugin; +use crate::facts::FactSet; + +use std::default::Default; + +use std::io; + +/// An EC2 instance metadata fact plugin. +/// +/// This plugin harvests all available facts present in the latest API revision of the EC2 metadata +/// service. +pub struct Ec2MetadataPlugin; + +impl Ec2MetadataPlugin { + pub fn new() -> Self { + Self::default() + } +} + +impl Default for Ec2MetadataPlugin { + fn default() -> Self { + Self + } +} + +impl FactPlugin for Ec2MetadataPlugin { + fn discover(&self) -> Result { + Ok(FactSet::new()) + } +} From 77660d7969bfa6e5771db6a74b933692adf57888 Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Wed, 19 Jun 2019 11:49:54 -0700 Subject: [PATCH 02/12] fix badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd5d0c3..e450cf2 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Licensed at your discretion under either: - [MIT License](./LICENSE-MIT) [docker]: https://cloud.docker.com/repository/docker/naftulikay/jinjer - [docker.svg]: https://img.shields.io/docker/build/naftulikay/jinjer.svg + [docker.svg]: https://img.shields.io/docker/cloud/build/naftulikay/jinjer.svg [tera]: https://tera.netlify.com/ [travis]: https://travis-ci.org/naftulikay/jinjer [travis.svg]: https://travis-ci.org/naftulikay/jinjer.svg?branch=master From f021f4a4af0b274e29b43c6b3644e099e7a6f52b Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Thu, 20 Jun 2019 15:45:00 -0700 Subject: [PATCH 03/12] demo request --- Cargo.lock | 1120 ++++++++++++++++++++++++++++- Cargo.toml | 4 + src/facts/plugins/ec2.rs | 4 + src/facts/plugins/ec2/metadata.rs | 26 + 4 files changed, 1142 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c0f007c..e594cff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,219 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "actix-codec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-connect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-http" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-connect 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-server-config 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-threadpool 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "copyless 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-router" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-rt" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-threadpool 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-server" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-rt 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-server-config 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-server-config" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-service" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-threadpool" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-utils" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-web" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-http 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-router 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-server 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-server-config 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-threadpool 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web-codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "awc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-web-codegen" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "adler32" version = "1.0.3" @@ -31,6 +245,14 @@ name = "arc-swap" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "arrayvec" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "atty" version = "0.2.11" @@ -46,6 +268,57 @@ name = "autocfg" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "awc" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-http 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bitflags" version = "1.1.0" @@ -70,6 +343,24 @@ dependencies = [ "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "brotli-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "brotli2" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bstr" version = "0.1.4" @@ -93,6 +384,15 @@ name = "byteorder" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cc" version = "1.0.37" @@ -135,6 +435,11 @@ dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "copyless" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "crc" version = "1.8.1" @@ -151,6 +456,19 @@ dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-channel" version = "0.3.8" @@ -160,6 +478,36 @@ dependencies = [ "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-deque" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-utils" version = "0.6.5" @@ -169,6 +517,30 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "derive_more" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "derive_more" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "deunicode" version = "0.4.3" @@ -187,6 +559,98 @@ name = "dtoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "either" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "encoding" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-japanese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-korean" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-simpchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-singlebyte" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-tradchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding_index_tests" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "enum-as-inner" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure_derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.35 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -213,6 +677,25 @@ name = "fuchsia-cprng" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "generic-array" version = "0.12.0" @@ -242,6 +725,28 @@ dependencies = [ "walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "h2" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hashbrown" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "heck" version = "0.3.1" @@ -250,6 +755,30 @@ dependencies = [ "unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hostname" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "httparse" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "humansize" version = "1.1.0" @@ -290,6 +819,31 @@ dependencies = [ "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "indexmap" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "iovec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ipconfig" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itoa" version = "0.4.4" @@ -299,6 +853,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "jinjer" version = "0.1.0" dependencies = [ + "actix-rt 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log4rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -309,6 +867,20 @@ dependencies = [ "tera 1.0.0-beta.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "language-tags" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "lazy_static" version = "1.3.0" @@ -324,6 +896,15 @@ name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lock_api" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "lock_api" version = "0.2.0" @@ -370,6 +951,14 @@ dependencies = [ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "maplit" version = "1.0.1" @@ -381,38 +970,104 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "memchr" -version = "2.2.0" +name = "memchr" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memoffset" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mime" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz-sys" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz_oxide" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz_oxide_c_api" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "miniz-sys" -version = "0.1.12" +name = "mio-uds" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "miniz_oxide" +name = "miow" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "miniz_oxide_c_api" -version = "0.2.1" +name = "net2" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "nodrop" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "num-integer" version = "0.1.41" @@ -456,6 +1111,23 @@ dependencies = [ "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "owning_ref" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot" version = "0.8.0" @@ -466,6 +1138,18 @@ dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot_core" version = "0.5.0" @@ -683,6 +1367,20 @@ dependencies = [ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "resolv-conf" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rustc_version" version = "0.2.3" @@ -704,6 +1402,11 @@ dependencies = [ "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "scopeguard" version = "1.0.0" @@ -759,6 +1462,17 @@ dependencies = [ "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "serde_urlencoded" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "serde_yaml" version = "0.8.9" @@ -781,6 +1495,34 @@ dependencies = [ "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sha1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "signal-hook" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook-registry 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "signal-hook-registry" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "slug" version = "0.1.4" @@ -794,6 +1536,30 @@ name = "smallvec" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "socket2" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "string" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "strsim" version = "0.8.0" @@ -829,6 +1595,17 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "synstructure" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.35 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tera" version = "1.0.0-beta.9" @@ -885,6 +1662,14 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "threadpool" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "time" version = "0.1.42" @@ -895,11 +1680,172 @@ dependencies = [ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-codec" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-executor" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-io" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-signal" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-sync" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-timer" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-udp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "traitobject" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "trust-dns-proto" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "ipconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-proto 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "typemap" version = "0.3.3" @@ -967,6 +1913,14 @@ dependencies = [ "unic-common 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unicase" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicode-bidi" version = "0.3.4" @@ -1011,6 +1965,7 @@ name = "url" version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1026,6 +1981,11 @@ name = "vec_map" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "walkdir" version = "2.2.8" @@ -1036,6 +1996,16 @@ dependencies = [ "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "widestring" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi" version = "0.3.7" @@ -1045,6 +2015,11 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1063,6 +2038,31 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winreg" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winutil" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "yaml-rust" version = "0.4.3" @@ -1072,65 +2072,128 @@ dependencies = [ ] [metadata] +"checksum actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9f2c11af4b06dc935d8e1b1491dad56bfb32febc49096a91e773f8535c176453" +"checksum actix-connect 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d7fbab0d79b2f3415a79570e3db12eaa75c26239541e613b832655145a5e9488" +"checksum actix-http 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "81aa906e74d2cd5f219f596003b0fd94d05e75a4a448b12afea66e7658b6c9e1" +"checksum actix-router 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "23224bb527e204261d0291102cb9b52713084def67d94f7874923baefe04ccf7" +"checksum actix-rt 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ed0424cdf6542a43b32a8885c7c5099bf4110fad9b50d7fb220ab9c038ecf5ec" +"checksum actix-server 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ba8c936356c882420eab87051b12ca1926dc42348863d05fff7eb151df9cddbb" +"checksum actix-server-config 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e78703f07d0bd08b426b482d53569d84f1e1929024f0431b3a5a2dc0c1c60e0f" +"checksum actix-service 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aaecc01bbc595ebd7a563a7d4f8a607d0b964bb55273c6f362b0b02c26508cf2" +"checksum actix-threadpool 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1c29f7c554d56b3841f4bb85d5b3dee01ba536e1307679f56eb54de28aaec3fb" +"checksum actix-utils 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7ab47adc5e67fc83a0c58570b40531f09814a5daa969e0d913ebeab908a43508" +"checksum actix-web 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6478c837afbe528cfe468976e67b6b81a6330414b00234c4546a158f9f0739fc" +"checksum actix-web-codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe9e3cdec1e645b675f354766e0688c5705021c85ab3cf739be1c8999b91c76" "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" "checksum arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "bc4662175ead9cd84451d5c35070517777949a2ed84551764129cedb88384841" +"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" +"checksum awc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c5133e9ca1d7f0560fb271f20286be3e896dac5736040a62a7ef1d62003160b6" +"checksum backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)" = "ada4c783bb7e7443c14e0480f429ae2cc99da95065aeab7ee1b81ada0419404f" +"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" +"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09" +"checksum brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" +"checksum brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" "checksum bstr 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "59604ece62a407dc9164732e5adea02467898954c3a5811fd2dc140af14ef15b" "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d" "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum copyless 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f8ffa29b14f03d473f1558c789d020fe41bb7790774f429ff818f4ed9a6f9a0e" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +"checksum crossbeam 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b14492071ca110999a20bf90e3833406d5d66bfd93b4e52ec9539025ff43fe0d" "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" +"checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" +"checksum derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d944ac6003ed268757ef1ee686753b57efc5fcf0ebe7b64c9fc81e7e32ff839" +"checksum derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a141330240c921ec6d074a3e188a7c7ef95668bb95e7d44fa0e5778ec2a7afe" "checksum deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" +"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" +"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" +"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" +"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" +"checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" +"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" +"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" +"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" +"checksum enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d58266c97445680766be408285e798d3401c6d4c378ec5552e78737e681e37d" +"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" +"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum flate2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f87e68aa82b2de08a6e037f1385455759df6e445a8df5e005b4297191dbf18aa" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)" = "a2037ec1c6c1c4f79557762eab1f7eae1f64f6cb418ace90fae88f0942b60139" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum globset 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef4feaabe24a0a658fd9cf4a9acf6ed284f045c77df0f49020ba3245cfb7b454" "checksum globwalk 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "53cbcf0368596897b0a3b8ff2110acf2400e80ffad4ca9238b52ff282a9b267b" +"checksum h2 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "69b2a5a3092cbebbc951fe55408402e696ee2ed09019137d1800fc2c411265d2" +"checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +"checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" +"checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" +"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum ignore 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8dc57fa12805f367736a38541ac1a9fc6a52812a0ca959b1d4d4b640a89eb002" +"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" +"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" +"checksum ipconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa79fa216fbe60834a9c0737d7fcd30425b32d1c58854663e24d4c4b328ed83f" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "6281b86796ba5e4366000be6e9e18bf35580adf9e63fbe2294aadb587613a319" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum log-mdc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" "checksum log4rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "100052474df98158c0738a7d3f4249c99978490178b5f9f68cd835ac57adbd1b" +"checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" "checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" +"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" "checksum miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" "checksum miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c468f2369f07d651a5d0bb2c9079f8488a66d5466efe42d0c5c6466edcb7f71e" "checksum miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fe927a42e3807ef71defb191dc87d4e24479b221e67015fe38ae2b7b447bab" +"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" +"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" "checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" "checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" "checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518" +"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" +"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "933085deae3f32071f135d799d75667b63c8dc1f4537159756e3d4ceab41868c" @@ -1155,9 +2218,12 @@ dependencies = [ "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 1.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0b2f0808e7d7e4fb1cb07feb6ff2f4bc827938f24f8c2e6a3beb7370af544bdd" "checksum regex-syntax 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d76410686f9e3a17f06128962e0ecc5755870bb890c34820c7af7f1db2e1d48" +"checksum resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b263b4aa1b5de9ffc0054a2386f96992058bb6870aab516f8cdeb8a667d56dcb" +"checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" +"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" @@ -1165,21 +2231,43 @@ dependencies = [ "checksum serde-value 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7a663f873dedc4eac1a559d4c6bc0d0b2c34dc5ac4702e105014b8281489e44f" "checksum serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)" = "46a3223d0c9ba936b61c0d2e3e559e3217dbfb8d65d06d26e8b3c25de38bae3e" "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" +"checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" "checksum serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)" = "38b08a9a90e5260fe01c6480ec7c811606df6d3a660415808c3c3fa8ed95b582" "checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" +"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +"checksum signal-hook 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "72ab58f1fda436857e6337dcb6a5aaa34f16c5ddc87b3a8b6ef7a212f90b9c5a" +"checksum signal-hook-registry 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cded4ffa32146722ec54ab1f16320568465aa922aa9ab4708129599740da85d7" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" +"checksum socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "4e626972d3593207547f14bf5fc9efa4d0e7283deb73fef1dff313dae9ab8878" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" +"checksum string 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0bbfb8937e38e34c3444ff00afb28b0811d9554f15c5ad64d12b0308d1d1995" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum structopt 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fa19a5a708e22bb5be31c1b6108a2a902f909c4b9ba85cba44c06632386bc0ff" "checksum structopt-derive 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d59d0ae8ef8de16e49e3ca7afa16024a3e0dfd974a75ef93fdc5464e34523f" "checksum syn 0.15.35 (registry+https://github.com/rust-lang/crates.io-index)" = "641e117d55514d6d918490e47102f7e08d096fdde360247e4a10f7a91a8478d3" +"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" "checksum tera 1.0.0-beta.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f868d9b04e269cc4bb2108e3f0631937ccb004c68ef715e489649385c0b04185" "checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" +"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" +"checksum tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "83ea44c6c0773cc034771693711c35c677b4b5a4b21b9e7071704c54de7d555e" +"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" +"checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" +"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" +"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" +"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" +"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" +"checksum trust-dns-proto 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5559ebdf6c2368ddd11e20b11d6bbaf9e46deb803acd7815e93f5a7b4a6d2901" +"checksum trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c9992e58dba365798803c0b91018ff6c8d3fc77e06977c4539af2a6bfe0a039" "checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-trie 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "71a9c5b1fe77426cf144cc30e49e955270f5086e31a6441dfa8b32efc09b9d77" @@ -1190,6 +2278,7 @@ dependencies = [ "checksum unic-segment 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" "checksum unic-ucd-segment 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" "checksum unic-ucd-version 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1967f4cdfc355b37fd76d2a954fb2ed3871034eb4f26d60537d88795cfc332a9" @@ -1199,9 +2288,16 @@ dependencies = [ "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d50aa7650df78abf942826607c62468ce18d9019673d4a2ebe1865dbb96ffde" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c7904a7e2bb3cdf0cf5e783f44204a85a37a93151738fa349f06680f59a98b45" +"checksum widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effc0e4ff8085673ea7b9b2e3c73f6bd4d118810c9009ed8f1e16bd96c331db6" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum winreg 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "daf67b95d0b1bf421c4f11048d63110ca3719977169eec86396b614c8942b6e0" +"checksum winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" diff --git a/Cargo.toml b/Cargo.toml index 8f26f57..ae954e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,10 @@ authors = ["Naftuli Kay "] edition = "2018" [dependencies] +actix-rt = "0.2" +actix-web = "1.0" +crossbeam = "0.7" +futures = "0.1" log = "0.4" log4rs = "0.8" num_cpus = "1.10" diff --git a/src/facts/plugins/ec2.rs b/src/facts/plugins/ec2.rs index a9d4014..3a22215 100644 --- a/src/facts/plugins/ec2.rs +++ b/src/facts/plugins/ec2.rs @@ -3,6 +3,8 @@ mod metadata; use crate::facts::FactPlugin; use crate::facts::FactSet; +use log; + use serde_json::Value; use std::default::Default; @@ -28,6 +30,8 @@ impl Default for Ec2Plugin { impl FactPlugin for Ec2Plugin { fn discover(&self) -> Result { + log::info!("Discovering EC2 facts..."); + let mut r = FactSet::new(); let meta = metadata::Ec2MetadataPlugin::new(); diff --git a/src/facts/plugins/ec2/metadata.rs b/src/facts/plugins/ec2/metadata.rs index 22bf5df..363f52f 100644 --- a/src/facts/plugins/ec2/metadata.rs +++ b/src/facts/plugins/ec2/metadata.rs @@ -1,10 +1,20 @@ +use actix_rt::System; +use actix_web::client::Client; + use crate::facts::FactPlugin; use crate::facts::FactSet; +use futures::future::lazy; +use futures::future::Future; + +use log; + use std::default::Default; use std::io; +static METADATA_URL: &'static str = "http://169.254.169.254/latest/meta-data/"; + /// An EC2 instance metadata fact plugin. /// /// This plugin harvests all available facts present in the latest API revision of the EC2 metadata @@ -25,6 +35,22 @@ impl Default for Ec2MetadataPlugin { impl FactPlugin for Ec2MetadataPlugin { fn discover(&self) -> Result { + log::info!("Discovering EC2 metadata facts..."); + + System::new("ec2-metadata") + .block_on(lazy(|| { + Client::default() + .get(METADATA_URL) + .header("User-Agent", "jinjer") + .send() + .map_err(|e| log::error!("Error: {:?}", e)) + .and_then(|response| { + log::info!("Response: {:?}", response); + Ok(()) + }) + })) + .unwrap(); + Ok(FactSet::new()) } } From 26737f42cc31b0958bec6c27688485dc90af2c3d Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Fri, 21 Jun 2019 13:16:26 -0700 Subject: [PATCH 04/12] attempting to do discovery --- Cargo.lock | 2 ++ Cargo.toml | 4 ++- src/facts/plugins/ec2.rs | 47 +++++++++++++++++++++++++++++++ src/facts/plugins/ec2/metadata.rs | 8 ++++-- src/main.rs | 15 ++++++++++ 5 files changed, 73 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e594cff..8e177fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -857,6 +857,8 @@ dependencies = [ "actix-web 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log4rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index ae954e5..210dc8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,8 @@ actix-rt = "0.2" actix-web = "1.0" crossbeam = "0.7" futures = "0.1" +http = "0.1" +lazy_static = "1.3" log = "0.4" log4rs = "0.8" num_cpus = "1.10" @@ -16,4 +18,4 @@ parking_lot = "0.8" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" structopt = "0.2" -tera = "1.0.0-beta.9" +tera = "1.0.0-beta.9" \ No newline at end of file diff --git a/src/facts/plugins/ec2.rs b/src/facts/plugins/ec2.rs index 3a22215..3a0caab 100644 --- a/src/facts/plugins/ec2.rs +++ b/src/facts/plugins/ec2.rs @@ -1,16 +1,29 @@ mod metadata; +use actix_web::client::Client; +use actix_web::http::header::HeaderValue; + use crate::facts::FactPlugin; use crate::facts::FactSet; +use futures::Future; + +use http::StatusCode; + use log; use serde_json::Value; use std::default::Default; +use std::env; + use std::io; +lazy_static! { + pub static ref EC2_METADATA_URL: String = format!("http://{}/", env::var("EC2_METADATA_HOST").unwrap_or("169.254.169.254".to_string())); +} + /// A fact plugin for EC2-related data. /// /// This plugin will produce EC2 metadata and EC2 tag facts. @@ -20,6 +33,36 @@ impl Ec2Plugin { pub fn new() -> Self { Self::default() } + + /// Determine whether we are currently running in EC2. + /// + /// At present, we send a HEAD request to the EC2 metadata service and examine the `Server` header to determine + /// whether we're in EC2. If the `Server` header is `EC2ws`, we're in EC2. + fn is_ec2(&self) -> bool { + log::debug!("Checking the EC2 metadata server to detect whether we're in EC2..."); + + let fut = Client::default().head(EC2_METADATA_URL.as_str()) + .header("User-Agent", "jinjer") + .send(); + + match fut.wait() { + Ok(response) => { + match response.status() { + StatusCode::OK => { + response.headers().get("Server").unwrap_or(&HeaderValue::from_static("Unknown")) == HeaderValue::from_static("EC2ws") + }, + _ => { + log::debug!("Received non-200 response: {:?}", response); + false + } + } + }, + Err(e) => { + log::debug!("Unable to query EC2 metadata service: {:?}", e); + false + } + } + } } impl Default for Ec2Plugin { @@ -30,6 +73,10 @@ impl Default for Ec2Plugin { impl FactPlugin for Ec2Plugin { fn discover(&self) -> Result { + if !self.is_ec2() { + return Err(io::Error::new(io::ErrorKind::Other, "Not running in EC2.")); + } + log::info!("Discovering EC2 facts..."); let mut r = FactSet::new(); diff --git a/src/facts/plugins/ec2/metadata.rs b/src/facts/plugins/ec2/metadata.rs index 363f52f..9aa3bbd 100644 --- a/src/facts/plugins/ec2/metadata.rs +++ b/src/facts/plugins/ec2/metadata.rs @@ -11,9 +11,13 @@ use log; use std::default::Default; +use std::env; + use std::io; -static METADATA_URL: &'static str = "http://169.254.169.254/latest/meta-data/"; +lazy_static! { + static ref METADATA_URL: String = format!("http://{}/latest/meta-data/", env::var("EC2_METADATA_HOST").unwrap_or("169.254.169.254".to_string())); +} /// An EC2 instance metadata fact plugin. /// @@ -40,7 +44,7 @@ impl FactPlugin for Ec2MetadataPlugin { System::new("ec2-metadata") .block_on(lazy(|| { Client::default() - .get(METADATA_URL) + .get(METADATA_URL.as_str()) .header("User-Agent", "jinjer") .send() .map_err(|e| log::error!("Error: {:?}", e)) diff --git a/src/main.rs b/src/main.rs index 0c92e44..32e1fea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,19 @@ +#[macro_use] +extern crate lazy_static; + mod cli; mod cmd; mod facts; mod logging; +use actix_rt::System; + +use parking_lot::Once; + use structopt::StructOpt; +static CREATE_ACTIX_RUNTIME: Once = Once::new(); + fn main() { // parse CLI args let args = cli::Args::from_args(); @@ -12,6 +21,12 @@ fn main() { // initialize logging logging::init(&args); + // setup actix system runtime + CREATE_ACTIX_RUNTIME.call_once(|| { + log::info!("Setting up Actix system..."); + let _ = System::new("jinjer"); + }); + // execute the given command match args.command { cli::Command::Facts(f) => cmd::facts::call(f), From 5b8f0029eb3811ceb5e258f7822b41bb8d91e28d Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Fri, 21 Jun 2019 13:44:59 -0700 Subject: [PATCH 05/12] allow specify root level via environment var --- src/logging.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/logging.rs b/src/logging.rs index 9b2e32a..6cb2a23 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -11,13 +11,19 @@ use log4rs::encode::Encode; use parking_lot::Once; +use std::env; + +use std::str::FromStr; + static APPENDER_NAME: &'static str = "stderr"; static INITIALIZE: Once = Once::new(); static LOG_FORMAT: &'static str = "{d(%Y-%m-%dT%H:%M:%S%.3f%z)} {l:5.5} [{T}] {M}: {m}{n}"; -static ROOT_LEVEL: LevelFilter = LevelFilter::Error; +static DEFAULT_ROOT_LEVEL: LevelFilter = LevelFilter::Error; + +static ROOT_LEVEL_ENV_VAR: &'static str = "LOG4RS_ROOT_LEVEL"; /// Initialize logging. This function is idempotent. pub fn init(config: &Args) { @@ -45,7 +51,12 @@ fn init_once(config: &Args) { Config::builder() .appender(Appender::builder().build(APPENDER_NAME, appender)) .logger(Logger::builder().build("jinjer", level)) - .build(Root::builder().appender(APPENDER_NAME).build(ROOT_LEVEL)) + .build(Root::builder().appender(APPENDER_NAME).build( + match env::var(ROOT_LEVEL_ENV_VAR) { + Ok(s) => LevelFilter::from_str(s.as_str()).expect("unknown logging level"), + Err(_) => DEFAULT_ROOT_LEVEL, + } + )) .unwrap(), ) .unwrap(); From c0d966e1a7d97a7c89d93c77953a7cfe1b96aa26 Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Fri, 21 Jun 2019 14:24:50 -0700 Subject: [PATCH 06/12] expose log formatting too --- src/logging.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/logging.rs b/src/logging.rs index 6cb2a23..96b23bf 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -19,7 +19,9 @@ static APPENDER_NAME: &'static str = "stderr"; static INITIALIZE: Once = Once::new(); -static LOG_FORMAT: &'static str = "{d(%Y-%m-%dT%H:%M:%S%.3f%z)} {l:5.5} [{T}] {M}: {m}{n}"; +static DEFAULT_LOG_FORMAT: &'static str = "{d(%Y-%m-%dT%H:%M:%S%.3f%z)} {l:5.5} [{T}] {M}: {m}{n}"; + +static LOG_FORMAT_ENV_VAR: &'static str = "LOG4RS_LOG_FORMAT"; static DEFAULT_ROOT_LEVEL: LevelFilter = LevelFilter::Error; @@ -31,7 +33,13 @@ pub fn init(config: &Args) { } fn init_once(config: &Args) { - let encoder: Box = Box::new(PatternEncoder::new(LOG_FORMAT)); + let encoder: Box = Box::new(PatternEncoder::new( + match env::var(LOG_FORMAT_ENV_VAR) { + Ok(ref s) => &s, + _ => DEFAULT_LOG_FORMAT, + } + )); + let appender: Box = Box::new( ConsoleAppender::builder() .encoder(encoder) From 6384f5d724d99758fc08e5d249b3b289daf65f0e Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Mon, 24 Jun 2019 12:45:56 -0700 Subject: [PATCH 07/12] rust format --- src/facts/plugins/ec2/metadata.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/facts/plugins/ec2/metadata.rs b/src/facts/plugins/ec2/metadata.rs index 9aa3bbd..e3233d6 100644 --- a/src/facts/plugins/ec2/metadata.rs +++ b/src/facts/plugins/ec2/metadata.rs @@ -16,7 +16,10 @@ use std::env; use std::io; lazy_static! { - static ref METADATA_URL: String = format!("http://{}/latest/meta-data/", env::var("EC2_METADATA_HOST").unwrap_or("169.254.169.254".to_string())); + static ref METADATA_URL: String = format!( + "http://{}/latest/meta-data/", + env::var("EC2_METADATA_HOST").unwrap_or("169.254.169.254".to_string()) + ); } /// An EC2 instance metadata fact plugin. From d783f37443e7bbd79c7e05b12d13a623d28dbac7 Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Mon, 24 Jun 2019 13:15:22 -0700 Subject: [PATCH 08/12] this works --- src/facts.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/facts.rs b/src/facts.rs index abf758c..5c0a9f3 100644 --- a/src/facts.rs +++ b/src/facts.rs @@ -1,5 +1,9 @@ pub mod plugins; +use actix_rt::System; + +use futures::Future; + use serde_json::Map; use serde_json::Value; @@ -28,6 +32,15 @@ impl Facts { /// /// This operation will take some time as it fetches facts from all available providers. pub fn discover(&self) -> FactSet { + let mut result = FactSet::new(); + + result.extend(self.discover_sync()); + result.extend(self.discover_async()); + + result + } + + fn discover_sync(&self) -> FactSet { let mut r = FactSet::new(); for (name, plugin) in self.plugins.iter() { @@ -42,6 +55,11 @@ impl Facts { r } + fn discover_async(&self) -> FactSet { + + FactSet::new() + } + pub fn register(&mut self, id: &str, plugin: Box) { self.plugins.insert(id.to_string(), plugin); } @@ -60,7 +78,15 @@ impl Default for Facts { } } +/// A plugin which discovers facts synchronously. pub trait FactPlugin { /// Execute the plugin, discovering and returning all available facts. fn discover(&self) -> Result; } + +/// A plugin which discovers facts asynchronously. +pub trait AsyncFactPlugin { + /// Execute the plugin, yielding a future that can be polled for readiness. + fn discover(&self) -> Future; + +} From 6a3f4c206283cb99bd82e438f9a9e65811176e2d Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Mon, 24 Jun 2019 13:50:06 -0700 Subject: [PATCH 09/12] separate registry --- src/facts.rs | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/facts.rs b/src/facts.rs index 5c0a9f3..feaeb1f 100644 --- a/src/facts.rs +++ b/src/facts.rs @@ -1,31 +1,34 @@ pub mod plugins; -use actix_rt::System; - use futures::Future; use serde_json::Map; use serde_json::Value; use std::collections::HashMap; - use std::default::Default; - use std::io; +use std::iter::once; pub type FactSet = Map; +/// A future that, when executed, returns a set of facts. +pub type FactSetFuture = Future; + +/// A registry for asynchronous plugins. +pub type AsyncPluginRegistry = HashMap>; + +/// A registry for synchronous plugins. pub type PluginRegistry = HashMap>; pub struct Facts { plugins: PluginRegistry, + async_plugins: AsyncPluginRegistry, } impl Facts { pub fn new() -> Self { - Self { - plugins: PluginRegistry::new(), - } + Self { ..Default::default() } } /// Discover all available facts via the registered fact plugins. @@ -34,12 +37,16 @@ impl Facts { pub fn discover(&self) -> FactSet { let mut result = FactSet::new(); - result.extend(self.discover_sync()); - result.extend(self.discover_async()); + for factset in once(self.discover_sync()).chain(once(self.discover_async())) { + result.extend(factset); + } result } + /// Discover synchronous fact plugins. + /// + /// FIXME either use rayon for parallelism here or just use futures everywhere fn discover_sync(&self) -> FactSet { let mut r = FactSet::new(); @@ -55,14 +62,18 @@ impl Facts { r } + /// Discover asynchronous fact plugins. fn discover_async(&self) -> FactSet { - FactSet::new() } pub fn register(&mut self, id: &str, plugin: Box) { self.plugins.insert(id.to_string(), plugin); } + + pub fn register_async(&mut self, id: &str, plugin: Box) { + self.async_plugins.insert(id.to_string(), plugin); + } } impl Default for Facts { From 6cb1cc8395c5478b2f759ac1a6ddc755ce023e5d Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Mon, 24 Jun 2019 16:35:17 -0700 Subject: [PATCH 10/12] I mean it like does futures and shit --- .gitignore | 1 + src/facts.rs | 71 ++++++++++--------------------- src/facts/plugins/basic.rs | 53 ++++++++++++----------- src/facts/plugins/ec2.rs | 64 ++++++++++++++++------------ src/facts/plugins/ec2/metadata.rs | 42 +++++++++--------- src/facts/plugins/env.rs | 18 +++++--- src/main.rs | 12 ------ 7 files changed, 121 insertions(+), 140 deletions(-) diff --git a/.gitignore b/.gitignore index 16df137..5d8096f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /.ansible/galaxy-roles /.vagrant +/.vscode /target **/*.rs.bk diff --git a/src/facts.rs b/src/facts.rs index feaeb1f..30cd48b 100644 --- a/src/facts.rs +++ b/src/facts.rs @@ -1,5 +1,7 @@ pub mod plugins; +use actix_rt::System; + use futures::Future; use serde_json::Map; @@ -8,27 +10,19 @@ use serde_json::Value; use std::collections::HashMap; use std::default::Default; use std::io; -use std::iter::once; pub type FactSet = Map; -/// A future that, when executed, returns a set of facts. -pub type FactSetFuture = Future; - -/// A registry for asynchronous plugins. -pub type AsyncPluginRegistry = HashMap>; - /// A registry for synchronous plugins. pub type PluginRegistry = HashMap>; pub struct Facts { plugins: PluginRegistry, - async_plugins: AsyncPluginRegistry, } impl Facts { pub fn new() -> Self { - Self { ..Default::default() } + Self { plugins: PluginRegistry::default() } } /// Discover all available facts via the registered fact plugins. @@ -37,42 +31,30 @@ impl Facts { pub fn discover(&self) -> FactSet { let mut result = FactSet::new(); - for factset in once(self.discover_sync()).chain(once(self.discover_async())) { - result.extend(factset); + // FIXME this should be parallelized using a stream map over the futures + for (name, plugin) in &self.plugins { + log::info!("Executing asynchronous plugin {}", name); + + match System::new("jinjer").block_on(plugin.discover()) { + Ok(v) => { + log::info!("Successfully determined {} facts.", name); + result.insert(name.to_string(), Value::Object(v)); + }, + Err(e) => { + match e.kind() { + io::ErrorKind::NotFound => log::debug!("Unable to resolve {} facts.", name), + _ => log::warn!("Unable to resolve facts for {}: {:?}", name, e), + }; + }, + }; } result } - /// Discover synchronous fact plugins. - /// - /// FIXME either use rayon for parallelism here or just use futures everywhere - fn discover_sync(&self) -> FactSet { - let mut r = FactSet::new(); - - for (name, plugin) in self.plugins.iter() { - match plugin.discover() { - Ok(f) => { - r.insert(name.to_string(), Value::Object(f)); - } - Err(e) => log::warn!("Discovery failed for {}: {}", name, e), - } - } - - r - } - - /// Discover asynchronous fact plugins. - fn discover_async(&self) -> FactSet { - FactSet::new() - } - + /// Register a plugin. pub fn register(&mut self, id: &str, plugin: Box) { - self.plugins.insert(id.to_string(), plugin); - } - - pub fn register_async(&mut self, id: &str, plugin: Box) { - self.async_plugins.insert(id.to_string(), plugin); + self.plugins.insert(id.to_string(), plugin.into()); } } @@ -89,15 +71,8 @@ impl Default for Facts { } } -/// A plugin which discovers facts synchronously. -pub trait FactPlugin { - /// Execute the plugin, discovering and returning all available facts. - fn discover(&self) -> Result; -} - /// A plugin which discovers facts asynchronously. -pub trait AsyncFactPlugin { +pub trait FactPlugin { /// Execute the plugin, yielding a future that can be polled for readiness. - fn discover(&self) -> Future; - + fn discover(&self) -> Box>; } diff --git a/src/facts/plugins/basic.rs b/src/facts/plugins/basic.rs index 765715c..b8ea053 100644 --- a/src/facts/plugins/basic.rs +++ b/src/facts/plugins/basic.rs @@ -1,6 +1,8 @@ use crate::facts::FactPlugin; use crate::facts::FactSet; +use futures::Future; + use log; use num_cpus; @@ -9,7 +11,6 @@ use serde_json::Number; use serde_json::Value; use std::default::Default; - use std::io; /// A fact plugin providing a basic set of system facts. @@ -28,29 +29,31 @@ impl Default for BasicPlugin { } impl FactPlugin for BasicPlugin { - fn discover(&self) -> Result { - log::info!("Discovering basic facts..."); - - let mut f = FactSet::new(); - - f.insert( - "cpu_cores".to_string(), - Value::Object({ - let mut p = FactSet::new(); - - p.insert( - "logical".to_string(), - Value::Number(Number::from(num_cpus::get())), - ); - p.insert( - "physical".to_string(), - Value::Number(Number::from(num_cpus::get_physical())), - ); - - p - }), - ); - - Ok(f) + fn discover(&self) -> Box> { + Box::new(futures::lazy(|| { + log::info!("Discovering basic facts..."); + + let mut f = FactSet::new(); + + f.insert( + "cpu_cores".to_string(), + Value::Object({ + let mut p = FactSet::new(); + + p.insert( + "logical".to_string(), + Value::Number(Number::from(num_cpus::get())), + ); + p.insert( + "physical".to_string(), + Value::Number(Number::from(num_cpus::get_physical())), + ); + + p + }), + ); + + Ok(f) + })) } } diff --git a/src/facts/plugins/ec2.rs b/src/facts/plugins/ec2.rs index 3a0caab..ad43c6c 100644 --- a/src/facts/plugins/ec2.rs +++ b/src/facts/plugins/ec2.rs @@ -3,17 +3,15 @@ mod metadata; use actix_web::client::Client; use actix_web::http::header::HeaderValue; +use futures::Future; + use crate::facts::FactPlugin; use crate::facts::FactSet; -use futures::Future; - use http::StatusCode; use log; -use serde_json::Value; - use std::default::Default; use std::env; @@ -21,7 +19,10 @@ use std::env; use std::io; lazy_static! { - pub static ref EC2_METADATA_URL: String = format!("http://{}/", env::var("EC2_METADATA_HOST").unwrap_or("169.254.169.254".to_string())); + pub static ref EC2_METADATA_URL: String = format!( + "http://{}/", + env::var("EC2_METADATA_HOST").unwrap_or("169.254.169.254".to_string()) + ); } /// A fact plugin for EC2-related data. @@ -35,30 +36,33 @@ impl Ec2Plugin { } /// Determine whether we are currently running in EC2. - /// + /// /// At present, we send a HEAD request to the EC2 metadata service and examine the `Server` header to determine /// whether we're in EC2. If the `Server` header is `EC2ws`, we're in EC2. fn is_ec2(&self) -> bool { log::debug!("Checking the EC2 metadata server to detect whether we're in EC2..."); - let fut = Client::default().head(EC2_METADATA_URL.as_str()) + let fut = Client::default() + .head(EC2_METADATA_URL.as_str()) .header("User-Agent", "jinjer") .send(); match fut.wait() { - Ok(response) => { - match response.status() { - StatusCode::OK => { - response.headers().get("Server").unwrap_or(&HeaderValue::from_static("Unknown")) == HeaderValue::from_static("EC2ws") - }, - _ => { - log::debug!("Received non-200 response: {:?}", response); - false - } + Ok(response) => match response.status() { + StatusCode::OK => { + response + .headers() + .get("Server") + .unwrap_or(&HeaderValue::from_static("Unknown")) + == HeaderValue::from_static("EC2ws") + } + _ => { + log::debug!("Received non-200 response: {:?}", response); + false } }, Err(e) => { - log::debug!("Unable to query EC2 metadata service: {:?}", e); + log::debug!("Unable to query EC2 metadata service: {:?}", e); false } } @@ -72,20 +76,24 @@ impl Default for Ec2Plugin { } impl FactPlugin for Ec2Plugin { - fn discover(&self) -> Result { - if !self.is_ec2() { - return Err(io::Error::new(io::ErrorKind::Other, "Not running in EC2.")); - } + fn discover(&self) -> Box> { + let is_ec2 = self.is_ec2(); + + Box::new(futures::lazy(move || { + if !is_ec2 { + return Err(io::Error::new(io::ErrorKind::Other, "Not running in EC2.")); + } - log::info!("Discovering EC2 facts..."); + log::info!("Discovering EC2 facts..."); - let mut r = FactSet::new(); - let meta = metadata::Ec2MetadataPlugin::new(); + let r = FactSet::new(); + let _meta = metadata::Ec2MetadataPlugin::new(); - // if ec2 metadata discovery fails, then we return that failure and ec2 facts are not - // returned - r.insert("metadata".to_string(), Value::Object(meta.discover()?)); + // if ec2 metadata discovery fails, then we return that failure and ec2 facts are not + // returned + // r.insert("metadata".to_string(), Value::Object(meta.discover()?)); - Ok(r) + Ok(r) + })) } } diff --git a/src/facts/plugins/ec2/metadata.rs b/src/facts/plugins/ec2/metadata.rs index e3233d6..928043b 100644 --- a/src/facts/plugins/ec2/metadata.rs +++ b/src/facts/plugins/ec2/metadata.rs @@ -4,8 +4,8 @@ use actix_web::client::Client; use crate::facts::FactPlugin; use crate::facts::FactSet; -use futures::future::lazy; -use futures::future::Future; +use futures::future; +use futures::Future; use log; @@ -41,23 +41,25 @@ impl Default for Ec2MetadataPlugin { } impl FactPlugin for Ec2MetadataPlugin { - fn discover(&self) -> Result { - log::info!("Discovering EC2 metadata facts..."); - - System::new("ec2-metadata") - .block_on(lazy(|| { - Client::default() - .get(METADATA_URL.as_str()) - .header("User-Agent", "jinjer") - .send() - .map_err(|e| log::error!("Error: {:?}", e)) - .and_then(|response| { - log::info!("Response: {:?}", response); - Ok(()) - }) - })) - .unwrap(); - - Ok(FactSet::new()) + fn discover(&self) -> Box> { + Box::new(future::lazy(|| { + log::info!("Discovering EC2 metadata facts..."); + + System::new("ec2-metadata") + .block_on(futures::lazy(|| { + Client::default() + .get(METADATA_URL.as_str()) + .header("User-Agent", "jinjer") + .send() + .map_err(|e| log::error!("Error: {:?}", e)) + .and_then(|response| { + log::info!("Response: {:?}", response); + Ok(()) + }) + })) + .unwrap(); + + Ok(FactSet::new()) + })) } } diff --git a/src/facts/plugins/env.rs b/src/facts/plugins/env.rs index d8c07ff..bcf0290 100644 --- a/src/facts/plugins/env.rs +++ b/src/facts/plugins/env.rs @@ -1,6 +1,8 @@ use crate::facts::FactPlugin; use crate::facts::FactSet; +use futures::Future; + use serde_json::Value; use std::default::Default; @@ -23,15 +25,17 @@ impl Default for EnvPlugin { } impl FactPlugin for EnvPlugin { - fn discover(&self) -> Result { - log::info!("Discovering facts from environment variables..."); + fn discover(&self) -> Box> { + Box::new(futures::lazy(|| { + log::info!("Discovering facts from environment variables..."); - let mut f = FactSet::new(); + let mut f = FactSet::new(); - for (key, value) in std::env::vars() { - f.insert(key, Value::String(value)); - } + for (key, value) in std::env::vars() { + f.insert(key, Value::String(value)); + } - Ok(f) + Ok(f) + })) } } diff --git a/src/main.rs b/src/main.rs index 32e1fea..3a8a559 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,14 +6,8 @@ mod cmd; mod facts; mod logging; -use actix_rt::System; - -use parking_lot::Once; - use structopt::StructOpt; -static CREATE_ACTIX_RUNTIME: Once = Once::new(); - fn main() { // parse CLI args let args = cli::Args::from_args(); @@ -21,12 +15,6 @@ fn main() { // initialize logging logging::init(&args); - // setup actix system runtime - CREATE_ACTIX_RUNTIME.call_once(|| { - log::info!("Setting up Actix system..."); - let _ = System::new("jinjer"); - }); - // execute the given command match args.command { cli::Command::Facts(f) => cmd::facts::call(f), From 72693d0e7657914268455a01f9267a5cbf93bc14 Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Tue, 25 Jun 2019 13:15:26 -0700 Subject: [PATCH 11/12] closer to futures --- Makefile | 27 +++++++++++++ src/facts/plugins/ec2.rs | 63 ++++++++----------------------- src/facts/plugins/ec2/metadata.rs | 4 +- 3 files changed, 45 insertions(+), 49 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..faff440 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +#!/usr/bin/make -f + +EXEC_NAME:=jinjer +RUST_RELEASE_TARGET:=x86_64-unknown-linux-musl + +release: + @cargo build --release --target $(RUST_RELEASE_TARGET) + +strip: + @strip target/$(RUST_RELEASE_TARGET)/release/$(EXEC_NAME) + +deploy: release strip +ifndef DEPLOY_HOST +$(error DEPLOY_HOST is not set.) +endif + + @echo "Deploying binary to $(DEPLOY_HOST)..." + @scp -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + target/$(RUST_RELEASE_TARGET)/release/$(EXEC_NAME) \ + $(DEPLOY_HOST):bin/ + +shell: +ifndef DEPLOY_HOST +$(error DEPLOY_HOST is not set.) +endif + @ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + $(DEPLOY_HOST) \ No newline at end of file diff --git a/src/facts/plugins/ec2.rs b/src/facts/plugins/ec2.rs index ad43c6c..77338b5 100644 --- a/src/facts/plugins/ec2.rs +++ b/src/facts/plugins/ec2.rs @@ -34,39 +34,6 @@ impl Ec2Plugin { pub fn new() -> Self { Self::default() } - - /// Determine whether we are currently running in EC2. - /// - /// At present, we send a HEAD request to the EC2 metadata service and examine the `Server` header to determine - /// whether we're in EC2. If the `Server` header is `EC2ws`, we're in EC2. - fn is_ec2(&self) -> bool { - log::debug!("Checking the EC2 metadata server to detect whether we're in EC2..."); - - let fut = Client::default() - .head(EC2_METADATA_URL.as_str()) - .header("User-Agent", "jinjer") - .send(); - - match fut.wait() { - Ok(response) => match response.status() { - StatusCode::OK => { - response - .headers() - .get("Server") - .unwrap_or(&HeaderValue::from_static("Unknown")) - == HeaderValue::from_static("EC2ws") - } - _ => { - log::debug!("Received non-200 response: {:?}", response); - false - } - }, - Err(e) => { - log::debug!("Unable to query EC2 metadata service: {:?}", e); - false - } - } - } } impl Default for Ec2Plugin { @@ -77,23 +44,25 @@ impl Default for Ec2Plugin { impl FactPlugin for Ec2Plugin { fn discover(&self) -> Box> { - let is_ec2 = self.is_ec2(); - - Box::new(futures::lazy(move || { - if !is_ec2 { - return Err(io::Error::new(io::ErrorKind::Other, "Not running in EC2.")); - } + let f = Client::default() + .get(EC2_METADATA_URL.as_str()) + .header("User-Agent", "jinjer") + .send() + .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{:?}", e))) + .map(|resp| { + log::debug!("Reached the EC2 metadata server: {:?}", resp); - log::info!("Discovering EC2 facts..."); + if resp.status() != StatusCode::OK { + log::debug!( + "Reached the EC2 metadata service, but received an error response." + ); - let r = FactSet::new(); - let _meta = metadata::Ec2MetadataPlugin::new(); + // return Err(io::Error::new(io::ErrorKind::NotFound, "HTTP error reaching EC2 metadata service.")); + } - // if ec2 metadata discovery fails, then we return that failure and ec2 facts are not - // returned - // r.insert("metadata".to_string(), Value::Object(meta.discover()?)); + FactSet::new() + }); - Ok(r) - })) + Box::new(f) } } diff --git a/src/facts/plugins/ec2/metadata.rs b/src/facts/plugins/ec2/metadata.rs index 928043b..1e6eb68 100644 --- a/src/facts/plugins/ec2/metadata.rs +++ b/src/facts/plugins/ec2/metadata.rs @@ -41,7 +41,7 @@ impl Default for Ec2MetadataPlugin { } impl FactPlugin for Ec2MetadataPlugin { - fn discover(&self) -> Box> { + fn discover(&self) -> Box> { Box::new(future::lazy(|| { log::info!("Discovering EC2 metadata facts..."); @@ -59,7 +59,7 @@ impl FactPlugin for Ec2MetadataPlugin { })) .unwrap(); - Ok(FactSet::new()) + Ok(FactSet::new()) })) } } From 1d1998962d3fbda118fe9d4e36dacd49cb3d0afc Mon Sep 17 00:00:00 2001 From: Naftuli Kay Date: Wed, 26 Jun 2019 16:10:45 -0700 Subject: [PATCH 12/12] MRAKE --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index faff440..6185db2 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ EXEC_NAME:=jinjer RUST_RELEASE_TARGET:=x86_64-unknown-linux-musl release: - @cargo build --release --target $(RUST_RELEASE_TARGET) + @cargo build --release --bin $(EXEC_NAME) --target $(RUST_RELEASE_TARGET) strip: @strip target/$(RUST_RELEASE_TARGET)/release/$(EXEC_NAME)