diff --git a/.rustfmt.toml b/.rustfmt.toml index 4df947e3..1599c01a 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,4 +1,4 @@ # https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#merge_imports merge_imports = true # https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#max_width -max_width = 120 \ No newline at end of file +max_width = 100 \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index aae6204d..3d2f4433 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,67 +1,127 @@ +[[package]] +name = "aho-corasick" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "arrayvec" -version = "0.4.7" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "autocfg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "backtrace" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.2 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.24" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" -version = "0.10.0" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bit-set" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bit-vec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bitflags" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "block-buffer" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-padding" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" -version = "1.2.6" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.1 (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.25" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -71,7 +131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -84,61 +144,104 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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.5.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (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.5.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "digest" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "dtoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "either" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "envy" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "failure" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.14 (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.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.6 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "fnv" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +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" @@ -164,32 +267,75 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "generic-array" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" -version = "0.1.13" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (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.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (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.1.3 (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 = "headers" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "headers-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "headers-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "headers-core" +version = "0.1.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)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "headers-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" -version = "0.1.13" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.10 (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)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -201,26 +347,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" -version = "0.12.12" +version = "0.12.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (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-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -231,12 +379,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "indexmap" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -244,7 +392,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -266,83 +414,80 @@ dependencies = [ name = "lambda_http" version = "0.1.0" dependencies = [ - "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "lambda_runtime 0.1.0", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (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.4 (registry+https://github.com/rust-lang/crates.io-index)", "simple_logger 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lambda_runtime" version = "0.1.0" dependencies = [ - "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", "lambda_runtime_client 0.1.0", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "simple_logger 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lambda_runtime_client" version = "0.1.0" dependencies = [ - "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lazy_static" -version = "1.1.0" +version = "1.3.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 = "lazycell" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.43" +version = "0.2.50" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lock_api" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "log" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -350,11 +495,24 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +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.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "mio" version = "0.6.16" @@ -364,12 +522,12 @@ dependencies = [ "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)", - "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (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.1 (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)", ] @@ -379,7 +537,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -399,14 +557,14 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "nodrop" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -424,15 +582,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "opaque-debug" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "owning_ref" -version = "0.3.3" +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)", @@ -440,22 +603,22 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.6.4" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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_core" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (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.5 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -466,45 +629,184 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.4.19" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proptest" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rusty-fork 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quick-error" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "quote" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.5.5" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_core" -version = "0.2.1" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_jitter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "redox_syscall" -version = "0.1.40" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "regex" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-syntax" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "remove_dir_all" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-demangle" -version = "0.1.9" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -515,9 +817,20 @@ dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rusty-fork" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "wait-timeout 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ryu" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -540,27 +853,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.79" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" -version = "1.0.79" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.31" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -570,8 +886,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha-1" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "simple-lambda-runtime" +version = "0.1.0" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "envy 0.3.3 (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.25 (registry+https://github.com/rust-lang/crates.io-index)", + "headers 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proptest 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-trace 0.0.1 (git+https://github.com/tokio-rs/tokio)", + "tokio-trace-fmt 0.1.0 (git+https://github.com/tokio-rs/tokio-trace-nursery)", + "tower 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-add-origin 0.1.0 (git+https://github.com/tower-rs/tower-http)", + "tower-buffer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-http-service 0.1.0 (git+https://github.com/tower-rs/tower-http)", + "tower-hyper 0.1.0 (git+https://github.com/tower-rs/tower-hyper)", + "tower-in-flight-limit 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-mock 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-retry 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-timeout 0.1.0 (git+https://github.com/tower-rs/tower)", ] [[package]] @@ -580,21 +939,18 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "slab" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.5" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "stable_deref_trait" @@ -603,59 +959,93 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "string" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.6" +version = "0.15.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (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 = "synstructure" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.29 (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 = "tempfile" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thread_local" +version = "0.3.6" +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)", +] + [[package]] name = "time" -version = "0.1.40" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.11" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.2 (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-fs 0.1.6 (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-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-buf" +version = "0.1.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)", + "either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -663,131 +1053,385 @@ name = "tokio-codec" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (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.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (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.5" +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.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-fs" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 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-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.9" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (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.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.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)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (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.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-sync" +version = "0.1.4" +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.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-tcp" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (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.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (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-threadpool" -version = "0.1.7" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 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)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (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.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (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-timer" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (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-trace" +version = "0.0.1" +source = "git+https://github.com/tokio-rs/tokio#d8177f81ac671a7667fb59f24ba9e2cdb7d3fe77" +dependencies = [ + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-trace-core" +version = "0.1.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)", +] + +[[package]] +name = "tokio-trace-fmt" +version = "0.1.0" +source = "git+https://github.com/tokio-rs/tokio-trace-nursery#9eccb03812fb42aff79b25847dfb40fd226b3639" +dependencies = [ + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-udp" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (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.16 (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.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (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-uds" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (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.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (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.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.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)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tower" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-balance 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-buffer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-discover 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-filter 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-in-flight-limit 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-load-shed 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-rate-limit 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-reconnect 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-retry 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", + "tower-util 0.1.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-add-origin" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower-http#6d7a9fdc8e2f7ec047dd24b39a06d5bedddb7ca1" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-balance" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (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)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-discover 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", + "tower-util 0.1.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-buffer" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-discover" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-filter" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-http-service" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower-http#6d7a9fdc8e2f7ec047dd24b39a06d5bedddb7ca1" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-buf 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-hyper" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower-hyper#c7a04bf1bbc8e5b8a70e47eea1f8ca3a6c470426" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-buf 0.1.0 (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)", + "tower 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-http-service 0.1.0 (git+https://github.com/tower-rs/tower-http)", + "tower-retry 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-in-flight-limit" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-layer" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-load-shed" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-mock" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-rate-limit" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-reconnect" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", + "tower-util 0.1.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-retry" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-service" +version = "0.2.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tower-timeout" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", +] + +[[package]] +name = "tower-util" +version = "0.1.0" +source = "git+https://github.com/tower-rs/tower#f1bb22a2965a831dfba7fe0ad3f3e6e6ad81a485" +dependencies = [ + "either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.2.0 (git+https://github.com/tower-rs/tower)", ] [[package]] @@ -795,6 +1439,24 @@ name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "typenum" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ucd-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicase" +version = "2.3.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" @@ -805,25 +1467,20 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "url" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -831,15 +1488,23 @@ dependencies = [ "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "utf8-ranges" +version = "1.0.2" +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 = "void" -version = "1.0.2" +name = "wait-timeout" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "want" @@ -847,7 +1512,7 @@ version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -890,99 +1555,164 @@ dependencies = [ ] [metadata] -"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" -"checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" -"checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" -"checksum base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "621fc7ecb8008f86d7fb9b95356cd692ce9514b80a86d85b397f32a22da7b9e2" +"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" +"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" +"checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" +"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 bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80" +"checksum bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" -"checksum bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0ce55bd354b095246fc34caf4e9e242f5297a7fd938b090cadfea6eee614aa62" -"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" -"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" +"checksum block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49665c62e0e700857531fa5d3763e91b539ff1abeebd56808d378b495870d60d" +"checksum block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d75255892aeb580d3c566f213a2b6fdc1c66667839f45719ee1d30ebf2aea591" +"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum cc 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "ad0daef304fa0b4238f5f7ed7178774b43b06f6a9b6509f6642bef4ff1f7b9b2" +"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3486aefc4c0487b9cb52372c97df0a48b8c249514af1ee99703bf70d2f2ceda1" -"checksum crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30fecfcac6abfef8771151f8be4abc9e4edc112c2bcb233314cafde2680536e9" -"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015" +"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 digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" "checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" -"checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" -"checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596" +"checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" +"checksum envy 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "20664407d5097b5a861dffb0c32af2be7215a0050415cb50232aec36d73f69df" +"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 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.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -"checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" -"checksum http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "24f58e8c2d8e886055c3ead7b28793e1455270b5fb39650984c224bc538ba581" +"checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" +"checksum h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "910a5e7be6283a9c91b3982fa5188368c8719cce2a3cf3b86048673bf9d9c36b" +"checksum headers 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6e2e51d356081258ef05ff4c648138b5d3fe64b7300aaad3b820554a2b7fb6" +"checksum headers-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51ae5b0b5417559ee1d2733b21d33b0868ae9e406bd32eb1a51d613f66ed472a" +"checksum headers-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97c462e8066bca4f0968ddf8d12de64c40f2c2187b3b9a2fa994d06e8ad444a9" +"checksum http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fe67e3678f2827030e89cc4b9e7ecd16d52f132c0b940ab5005f88e821500f6a" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" -"checksum hyper 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)" = "4aca412c241a2dd53af261efc7adf7736fdebd67dc0d1cc1ffdbcb9407e0e810" +"checksum hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)" = "7d5b6658b016965ae301fa995306db965c93677880ea70765a84235a96eae896" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08173ba1e906efb6538785a8844dd496f5d34f0a2d88038e95195172fc667220" +"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 itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" -"checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" -"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" -"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" -"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" +"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" +"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" +"checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" +"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "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 mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "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.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" +"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" -"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" -"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" -"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" +"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" +"checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" +"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_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901" -"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" -"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" -"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" -"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" -"checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" +"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" +"checksum proptest 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24f5844db2f839e97e3021980975f6ebf8691d9b9b2ca67ed3feb38dc3edb52c" +"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" +"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" +"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53ee8cfdddb2e0291adfb9f13d31d3bbe0a03c9a402c01b1e24188d86c35b24f" +"checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" +"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" +"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" +"checksum rusty-fork 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9591f190d2852720b679c21f66ad929f9f1d7bb09d1193c26167586029d8489c" +"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "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" -"checksum serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9" -"checksum serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "31569d901045afbff7a9479f793177fe9259819aff10ab4f89ef69bbc5f567fe" -"checksum serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "bb47a3d5c84320222f66d7db21157c4a7407755de41798f9b4c1c40593397b1a" +"checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" +"checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" +"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" "checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" +"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" "checksum simple_logger 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "25111f1d77db1ac3ee11b62ba4b7a162e6bb3be43e28273f0d3935cc8d3ff7fb" -"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" -"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" -"checksum syn 0.15.6 (registry+https://github.com/rust-lang/crates.io-index)" = "854b08a640fc8f54728fb95321e3ec485b365a97fe47609797c671addd1dde69" -"checksum synstructure 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ec37f4fab4bafaf6b5621c1d54e6aa5d4d059a8f84929e87abfdd7f9f04c6db2" -"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" -"checksum tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6e93c78d23cc61aa245a8acd2c4a79c4d7fa7fb5c3ca90d5737029f043a84895" +"checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" +"checksum syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1825685f977249735d510a242a6727b46efe914bb67e38d30c071b1b72b1d5c2" +"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" +"checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a" +"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "65641e515a437b308ab131a82ce3042ff9795bef5d6c5a9be4eb24195c417fd9" +"checksum tokio-buf 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "473a45a40e558d6d80e9f60e3d934c32488045def2745488a257e472941e9bce" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" -"checksum tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f90fcd90952f0a496d438a976afba8e5c205fb12123f813d8ab3aa1c8436638c" -"checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" -"checksum tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5cbe4ca6e71cb0b62a66e4e6f53a8c06a6eefe46cc5f665ad6f274c9906f135" -"checksum tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "8b8a85fffbec3c5ab1ab62324570230dcd37ee5996a7859da5caf7b9d45e3e8c" -"checksum tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4b26fd37f1125738b2170c80b551f69ff6fecb277e6e5ca885e53eec2b005018" -"checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" -"checksum tokio-threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bbd8a8b911301c60cbfaa2a6588fb210e5c1038375b8bdecc47aa09a94c3c05f" -"checksum tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3a52f00c97fedb6d535d27f65cccb7181c8dd4c6edc3eda9ea93f6d45d05168e" -"checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" -"checksum tokio-uds 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22e3aa6d1fcc19e635418dc0a30ab5bd65d347973d6f43f1a37bf8d9d1335fc9" +"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-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" +"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-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fda385df506bf7546e70872767f71e81640f1f251bdf2fd8eb81a0eaec5fe022" +"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" +"checksum tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ec5759cf26cf9659555f36c431b515e3d05f66831741c85b4b5d5dfb9cf1323c" +"checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" +"checksum tokio-trace 0.0.1 (git+https://github.com/tokio-rs/tokio)" = "" +"checksum tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350c9edade9830dc185ae48ba45667a445ab59f6167ef6d0254ec9d2430d9dd3" +"checksum tokio-trace-fmt 0.1.0 (git+https://github.com/tokio-rs/tokio-trace-nursery)" = "" +"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" +"checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" +"checksum tower 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-add-origin 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "" +"checksum tower-balance 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-buffer 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-discover 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-filter 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-http-service 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "" +"checksum tower-hyper 0.1.0 (git+https://github.com/tower-rs/tower-hyper)" = "" +"checksum tower-in-flight-limit 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-layer 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-load-shed 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-mock 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-rate-limit 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-reconnect 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-retry 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-service 0.2.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-timeout 0.1.0 (git+https://github.com/tower-rs/tower)" = "" +"checksum tower-util 0.1.0 (git+https://github.com/tower-rs/tower)" = "" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" +"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" +"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" +"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" +"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum wait-timeout 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b9f3bf741a801531993db6478b95682117471f76916f5e690dd8d45395b09349" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" diff --git a/Cargo.toml b/Cargo.toml index 2aae614b..bbb1325b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,5 +2,9 @@ members = [ "lambda-runtime-client", "lambda-runtime", - "lambda-http" -] \ No newline at end of file + "lambda-http", + "lambda-runtime-client-simple" +] + +[patch.crates-io] +tower-service = { git = "https://github.com/tower-rs/tower" } diff --git a/lambda-http/Cargo.toml b/lambda-http/Cargo.toml index 22861f75..66273a08 100644 --- a/lambda-http/Cargo.toml +++ b/lambda-http/Cargo.toml @@ -18,8 +18,8 @@ maintenance = { status = "actively-developed" } [dependencies] http = "0.1" serde = "^1" -serde_json = "^1" serde_derive = "^1" +serde_json = "^1" lambda_runtime = { path = "../lambda-runtime", version = "^0.1" } tokio = "^0.1" base64 = "0.10" diff --git a/lambda-http/src/body.rs b/lambda-http/src/body.rs index baf954e0..02df9c5c 100644 --- a/lambda-http/src/body.rs +++ b/lambda-http/src/body.rs @@ -150,10 +150,11 @@ impl<'a> Serialize for Body { S: Serializer, { match self { - Body::Text(data) => { - serializer.serialize_str(::std::str::from_utf8(data.as_ref()).map_err(S::Error::custom)?) + Body::Text(data) => serializer + .serialize_str(::std::str::from_utf8(data.as_ref()).map_err(S::Error::custom)?), + Body::Binary(data) => { + serializer.collect_str(&Base64Display::with_config(data, base64::STANDARD)) } - Body::Binary(data) => serializer.collect_str(&Base64Display::with_config(data, base64::STANDARD)), Body::Empty => serializer.serialize_unit(), } } diff --git a/lambda-http/src/ext.rs b/lambda-http/src/ext.rs index 6b4c76ab..60d1caf1 100644 --- a/lambda-http/src/ext.rs +++ b/lambda-http/src/ext.rs @@ -134,7 +134,10 @@ impl RequestExt for HttpRequest { } fn request_context(&self) -> RequestContext { - self.extensions().get::().cloned().unwrap_or_default() + self.extensions() + .get::() + .cloned() + .unwrap_or_default() } fn payload(&self) -> Result, PayloadError> @@ -144,9 +147,11 @@ impl RequestExt for HttpRequest { self.headers() .get(CONTENT_TYPE) .map(|ct| match ct.to_str() { - Ok("application/x-www-form-urlencoded") => serde_urlencoded::from_bytes::(self.body().as_ref()) - .map_err(PayloadError::WwwFormUrlEncoded) - .map(Some), + Ok("application/x-www-form-urlencoded") => { + serde_urlencoded::from_bytes::(self.body().as_ref()) + .map_err(PayloadError::WwwFormUrlEncoded) + .map(Some) + } Ok("application/json") => serde_json::from_slice::(self.body().as_ref()) .map_err(PayloadError::Json) .map(Some), @@ -177,14 +182,20 @@ mod tests { ..GatewayRequest::default() }; let actual = HttpRequest::from(gwr); - assert_eq!(actual.query_string_parameters(), StrMap(query.clone().into())); + assert_eq!( + actual.query_string_parameters(), + StrMap(query.clone().into()) + ); } #[test] fn requests_have_form_post_parseable_payloads() { let mut headers = HeaderMap::new(); headers.insert("Host", "www.rust-lang.org".parse().unwrap()); - headers.insert("Content-Type", "application/x-www-form-urlencoded".parse().unwrap()); + headers.insert( + "Content-Type", + "application/x-www-form-urlencoded".parse().unwrap(), + ); #[derive(Deserialize, PartialEq, Debug)] struct Payload { foo: String, @@ -211,7 +222,10 @@ mod tests { fn requests_have_form_post_parseable_payloads_for_hashmaps() { let mut headers = HeaderMap::new(); headers.insert("Host", "www.rust-lang.org".parse().unwrap()); - headers.insert("Content-Type", "application/x-www-form-urlencoded".parse().unwrap()); + headers.insert( + "Content-Type", + "application/x-www-form-urlencoded".parse().unwrap(), + ); let gwr: GatewayRequest<'_> = GatewayRequest { path: "/foo".into(), headers, diff --git a/lambda-http/src/lib.rs b/lambda-http/src/lib.rs index 8014a0fd..e2dfae61 100644 --- a/lambda-http/src/lib.rs +++ b/lambda-http/src/lib.rs @@ -45,6 +45,9 @@ //! } //! ``` +#[macro_use] +extern crate serde_derive; + pub use http::{self, Response}; use lambda_runtime::{self as lambda, error::HandlerError, Context}; use tokio::runtime::Runtime as TokioRuntime; diff --git a/lambda-http/src/request.rs b/lambda-http/src/request.rs index 2fcca05e..3b022bb7 100644 --- a/lambda-http/src/request.rs +++ b/lambda-http/src/request.rs @@ -12,7 +12,6 @@ use serde::{ de::{Error as DeError, MapAccess, Visitor}, Deserialize, Deserializer, }; -use serde_derive::Deserialize; use serde_json::Value; use crate::{ @@ -108,7 +107,9 @@ where } /// Deserialize a map of Cow<'_, str> => Vec> into an http::HeaderMap -fn deserialize_multi_value_headers<'de, D>(deserializer: D) -> Result, D::Error> +fn deserialize_multi_value_headers<'de, D>( + deserializer: D, +) -> Result, D::Error> where D: Deserializer<'de>, { @@ -136,8 +137,8 @@ where if !key.is_empty() { for value in values { let header_name = key.parse::().map_err(A::Error::custom)?; - let header_value = - HeaderValue::from_shared(value.into_owned().into()).map_err(A::Error::custom)?; + let header_value = HeaderValue::from_shared(value.into_owned().into()) + .map_err(A::Error::custom)?; headers.append(header_name, header_value); } } @@ -173,7 +174,8 @@ where .unwrap_or_else(HeaderMap::new); while let Some((key, value)) = map.next_entry::, Cow<'_, str>>()? { let header_name = key.parse::().map_err(A::Error::custom)?; - let header_value = HeaderValue::from_shared(value.into_owned().into()).map_err(A::Error::custom)?; + let header_value = HeaderValue::from_shared(value.into_owned().into()) + .map_err(A::Error::custom)?; headers.append(header_name, header_value); } Ok(headers) @@ -286,7 +288,9 @@ mod tests { headers, ..GatewayRequest::default() }; - let expected = HttpRequest::get("https://www.rust-lang.org/foo").body(()).unwrap(); + let expected = HttpRequest::get("https://www.rust-lang.org/foo") + .body(()) + .unwrap(); let actual = HttpRequest::from(gwr); assert_eq!(expected.method(), actual.method()); assert_eq!(expected.uri(), actual.uri()); @@ -299,7 +303,10 @@ mod tests { // https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-api-gateway-request let input = include_str!("../tests/data/apigw_proxy_request.json"); let result = serde_json::from_str::>(&input); - assert!(result.is_ok(), format!("event was not parsed as expected {:?}", result)); + assert!( + result.is_ok(), + format!("event was not parsed as expected {:?}", result) + ); } #[test] @@ -346,7 +353,9 @@ mod tests { assert_eq!( serde_json::from_str::(r#"{"foo":null}"#).expect("failed to deserialize"), - Test { foo: HashMap::new() } + Test { + foo: HashMap::new() + } ) } diff --git a/lambda-http/src/response.rs b/lambda-http/src/response.rs index 5258aa7c..bf08db26 100644 --- a/lambda-http/src/response.rs +++ b/lambda-http/src/response.rs @@ -9,9 +9,8 @@ use http::{ }; use serde::{ ser::{Error as SerError, SerializeMap}, - Serializer, + Deserialize, Serialize, Serializer, }; -use serde_derive::Serialize; use crate::body::Body; @@ -20,7 +19,10 @@ use crate::body::Body; #[serde(rename_all = "camelCase")] pub(crate) struct GatewayResponse { pub status_code: u16, - #[serde(skip_serializing_if = "HeaderMap::is_empty", serialize_with = "serialize_headers")] + #[serde( + skip_serializing_if = "HeaderMap::is_empty", + serialize_with = "serialize_headers" + )] pub headers: HeaderMap, #[serde( skip_serializing_if = "HeaderMap::is_empty", @@ -47,7 +49,10 @@ impl Default for GatewayResponse { } /// Serialize a http::HeaderMap into a serde str => str map -fn serialize_multi_value_headers(headers: &HeaderMap, serializer: S) -> Result +fn serialize_multi_value_headers( + headers: &HeaderMap, + serializer: S, +) -> Result where S: Serializer, { @@ -188,7 +193,8 @@ mod tests { #[test] fn serialize_default() { assert_eq!( - serde_json::to_string(&GatewayResponse::default()).expect("failed to serialize response"), + serde_json::to_string(&GatewayResponse::default()) + .expect("failed to serialize response"), r#"{"statusCode":200}"# ); } diff --git a/lambda-http/src/strmap.rs b/lambda-http/src/strmap.rs index 10801733..fb5dbddc 100644 --- a/lambda-http/src/strmap.rs +++ b/lambda-http/src/strmap.rs @@ -27,9 +27,12 @@ impl StrMap { /// Return all values associated with name where available pub fn get_all(&self, key: &str) -> Option> { - self.0 - .get(key) - .map(|values| values.iter().map(|owned| owned.as_str()).collect::>()) + self.0.get(key).map(|values| { + values + .iter() + .map(|owned| owned.as_str()) + .collect::>() + }) } /// Return true if the underlying map is empty @@ -70,13 +73,15 @@ impl<'a> Iterator for StrMapIter<'a> { #[inline] fn next(&mut self) -> Option<(&'a str, &'a str)> { - self.keys.next().and_then(|k| self.data.get(k).map(|v| (k.as_str(), v))) + self.keys + .next() + .and_then(|k| self.data.get(k).map(|v| (k.as_str(), v))) } } /// internal type used when deserializing StrMaps from /// potentially one or many valued maps -#[derive(serde_derive::Deserialize)] +#[derive(Deserialize)] #[serde(untagged)] enum OneOrMany { One(String), @@ -101,7 +106,10 @@ impl<'de> Deserialize<'de> for StrMap { where A: MapAccess<'de>, { - let mut inner = map.size_hint().map(HashMap::with_capacity).unwrap_or_else(HashMap::new); + let mut inner = map + .size_hint() + .map(HashMap::with_capacity) + .unwrap_or_else(HashMap::new); // values may either be String or Vec // to handle both single and multi value data while let Some((key, value)) = map.next_entry::<_, OneOrMany>()? { diff --git a/lambda-runtime-client-simple/Cargo.toml b/lambda-runtime-client-simple/Cargo.toml new file mode 100644 index 00000000..6b478423 --- /dev/null +++ b/lambda-runtime-client-simple/Cargo.toml @@ -0,0 +1,35 @@ +[package] +name = "simple-lambda-runtime" +version = "0.1.0" +authors = ["David Barsky "] +edition = "2018" + +[dependencies] +bytes = "^0.4" +failure = "^0.1" +futures = "^0.1" +hyper = "^0.12" +http = "^0.1" +headers = "0.2" +envy = "0.3" +tokio = "^0.1" +lazy_static = "1.3" +tokio-threadpool = "^0.1" +tokio-trace = { git = "https://github.com/tokio-rs/tokio" } +tokio-trace-fmt = { git = "https://github.com/tokio-rs/tokio-trace-nursery" } +tower = { git = "https://github.com/tower-rs/tower" } +tower-add-origin = { git = "https://github.com/tower-rs/tower-http" } +tower-http-service = { git = "https://github.com/tower-rs/tower-http" } +tower-hyper = { git = "https://github.com/tower-rs/tower-hyper" } +tower-mock = { git = "https://github.com/tower-rs/tower" } +tower-retry = { git = "https://github.com/tower-rs/tower" } +tower-timeout = { git = "https://github.com/tower-rs/tower" } +tower-buffer = { git = "https://github.com/tower-rs/tower" } +tower-in-flight-limit = { git = "https://github.com/tower-rs/tower" } +serde = { version = "^1", features = ["derive"] } +serde_derive = "^1" +serde_json = "^1" + +[dev-dependencies] +tokio-io = "0.1.12" +proptest = "0.9" \ No newline at end of file diff --git a/lambda-runtime-client-simple/examples/bootstrap.rs b/lambda-runtime-client-simple/examples/bootstrap.rs new file mode 100644 index 00000000..f19aa7ac --- /dev/null +++ b/lambda-runtime-client-simple/examples/bootstrap.rs @@ -0,0 +1,16 @@ +#[macro_use] +extern crate tokio_trace; + +use bytes::Bytes; +use futures::{future::ok, Future}; +use hyper::Body; +use simple_lambda_runtime::{lambda, Error}; + +fn main() -> Result<(), Error> { + lambda!(handler) +} + +fn handler(event: Body) -> Box + Send> { + info!("Received event"); + Box::new(ok(Bytes::from("hello"))) +} diff --git a/lambda-runtime-client-simple/src/client.rs b/lambda-runtime-client-simple/src/client.rs new file mode 100644 index 00000000..64498b5b --- /dev/null +++ b/lambda-runtime-client-simple/src/client.rs @@ -0,0 +1,67 @@ +use bytes::Bytes; +use futures::{Async, Future}; +use hyper::{Request, Uri}; +use std::{marker::PhantomData, time::Duration}; +use tower::{builder::ServiceBuilder, util::ServiceExt, Service}; +use tower_add_origin::{AddOrigin, Builder as AddOriginBuilder}; +use tower_buffer::{Buffer, BufferLayer}; +use tower_hyper::retry::RetryPolicy; +use tower_in_flight_limit::{InFlightLimit, InFlightLimitLayer}; +use tower_retry::RetryLayer; +use tower_timeout::{Timeout, TimeoutLayer}; + +type Err = Box; + +pub(crate) struct LambdaSvc +where + S: Service> + Send + 'static, + S::Error: std::error::Error + Send + Sync + 'static, + S::Future: Send, + B: Send + 'static, +{ + inner: Buffer>>, Request>, + _phan: PhantomData, +} + +impl LambdaSvc +where + S: Service> + Send + 'static, + S::Error: std::error::Error + Send + Sync + 'static, + S::Future: Send, + B: Send + 'static, +{ + fn new(svc: S, origin: Uri) -> Self { + let svc: AddOrigin = AddOriginBuilder::new().uri(origin).build(svc).unwrap(); + let svc = ServiceBuilder::new() + .layer(InFlightLimitLayer::new(1)) + .layer(TimeoutLayer::new(Duration::from_millis(300))) + .build_service(svc) + .unwrap(); + + Self { + inner: Buffer::new(svc, 1).unwrap(), + _phan: PhantomData, + } + } +} + +impl Service> for LambdaSvc +where + S: Service> + Send + 'static, + S::Error: std::error::Error + Send + Sync + 'static, + S::Future: Send, + B: Send + 'static, +{ + type Response = S::Response; + type Error = Err; + type Future = Box>; + + fn poll_ready(&mut self) -> Result, Self::Error> { + self.inner.poll_ready().map_err(|e| e.into()) + } + + fn call(&mut self, req: Request) -> Self::Future { + let fut = self.inner.call(req); + Box::new(fut) + } +} diff --git a/lambda-runtime-client-simple/src/lib.rs b/lambda-runtime-client-simple/src/lib.rs new file mode 100644 index 00000000..c17d83de --- /dev/null +++ b/lambda-runtime-client-simple/src/lib.rs @@ -0,0 +1,283 @@ +#[macro_use] +extern crate serde_derive; + +#[macro_use] +extern crate tokio_trace; +extern crate tokio_trace_fmt; + +use crate::{client::LambdaSvc, settings::Config}; +use hyper::client::HttpConnector; +use std::{str::FromStr, sync::Arc}; +use tokio_trace::field; + +use crate::types::{Context, FunctionArn, InvocationDeadline, RequestId, XRayTraceId}; +use bytes::{buf::FromBuf, Bytes, IntoBuf}; +use futures::{Async, Future, Poll, Sink, Stream}; +use headers::{HeaderMap, HeaderMapExt}; +use http::{ + uri::{Parts, PathAndQuery, Uri}, + Request, Response, +}; +use hyper::{Body, Client}; +use tokio::sync; +use tokio_trace_fmt::FmtSubscriber; +use tower::{util::ServiceExt, Service}; + +pub mod client; +pub mod settings; +pub mod types; + +#[macro_export] +/// The helper lambda macro. +macro_rules! lambda { + ($handler:ident) => { + $crate::start($handler) + }; +} + +pub type FutureObj = Box + Send>; +pub type Error = Box; + +pub trait Handler: Send +where + Event: FromBuf, + Response: IntoBuf, +{ + fn run(&mut self, event: Event) -> FutureObj; +} + +impl Handler for F +where + Event: FromBuf, + Response: IntoBuf, + F: FnMut(Event) -> FutureObj + Send, +{ + fn run(&mut self, event: Event) -> FutureObj { + (self)(event) + } +} + +impl Service for Handler +where + Event: FromBuf, + Response: IntoBuf, +{ + type Response = Response; + type Error = Error; + type Future = FutureObj; + + fn poll_ready(&mut self) -> Poll<(), Self::Error> { + Ok(Async::Ready(())) + } + + fn call(&mut self, req: Event) -> Self::Future { + Box::new(self.run(req)) + } +} + +fn run(handler: A, config: Config) +where + A: Fn(Body) -> FutureObj + Send + 'static, +{ + let uri = config.endpoint.parse::().unwrap(); + let client = RuntimeClient::new(uri); + let listener = EventStream::new(client.clone()); + // Since `EventStream` implements Stream, the `.for_each` combinator is used to + // process each incoming event. + let (tx, rx) = sync::mpsc::channel(1); + let svc = listener + .map_err(|e| error!({ error = field::debug(e) }, "error accepting event")) + .and_then(move |next_event: Response| { + let client = client.clone(); + info!({ event = field::debug(&next_event) }, "Received event"); + + let (parts, body) = next_event.into_parts(); + let context = Context::new(parts.headers); + + (handler)(body).into() + }) + .forward(tx) + .map_err(drop); + + + tokio::run(svc); +} + +pub fn start(f: A) -> Result<(), Error> +where + A: Fn(Body) -> FutureObj + Send + 'static, +{ + let subscriber = FmtSubscriber::builder().full().finish(); + tokio_trace::subscriber::with_default(subscriber, || { + span!("lambda").enter(|| { + info!("Reading config"); + let config = Config::from_env(); + info!("read config; launching function"); + run(f, config); + }); + }); + + Ok(()) +} + +pub struct EventStream { + client: RuntimeClient, + current: Option, Error>>, +} + +impl EventStream { + fn new(client: RuntimeClient) -> Self { + Self { + client, + current: None, + } + } + + fn next_event(&self) -> FutureObj, Error> { + span!("next_event").enter(|| { + let fut = self.client.next_event(); + Box::new(fut.map_err(|e| e.into())) + }) + } +} + +/// The `Stream` implementation for `EventStream` converts a `Future` +/// containing the next event from the Lambda Runtime into a continuous +/// stream of events. While _this_ stream will continue to produce +/// events indefinitely, AWS Lambda will only run the Lambda function attached +/// to this runtime *if and only if* there is an event available for it to process. +/// For Lambda functions that receive a “warm wakeup”—i.e., the function is +/// readily available in the Lambda service's cache—this runtime is able +/// to immediately fetch the next event. +impl Stream for EventStream { + type Item = Response; + type Error = Error; + + fn poll(&mut self) -> Poll, Self::Error> { + // The `loop` is used to drive the inner future (`current`) to completion, advancing + // the state of this stream to yield a new `Item`. Loops like the one below are + // common in many hand-implemented `Futures` and `Streams`. + loop { + // The stream first checks an inner future is set. If the future is present, + // the _Tokio_ runtime polls the inner future to completition. For more details + // on polling asychronous values, refer to the [documentation](https://docs.rs/futures/0.1/futures/future/trait.Future.html#tymethod.poll) on the poll method on `Future`. + if self.current.is_some() { + match self.current.poll()? { + // If the current inner future signals readiness/that it is complete: + // 1. Create a new Future that represents the _next_ event which will be polled + // by subsequent iterations of this loop. + // 2. Return the current future, yielding the resolved future. + Async::Ready(res) => { + self.current = Some(self.next_event()); + return Ok(Async::Ready(res)); + } + // Otherwise, the future signals that it's not ready, so we do the same + // to the Tokio runtime. + Async::NotReady => return Ok(Async::NotReady), + } + // If the future is not set (due to a cold start from inactivity or a fresh deployment), + // we set a new Future to be polled in subsequent loops. + } else { + self.current = Some(self.next_event()); + } + } + } +} + +struct EventSink> { + service: S, + _phan: std::marker::PhantomData, +} + +#[derive(Clone)] +pub struct Endpoint { + base: Uri, +} + +impl Endpoint { + pub fn new(base: Uri) -> Arc { + let e = Self { base }; + Arc::new(e) + } + + pub fn next_event(&self) -> Result { + let mut parts: Parts = self.base.clone().into_parts(); + + let query = PathAndQuery::from_str("/2018-06-01/runtime/invocation/next")?; + parts.path_and_query = Some(query); + + Ok(Uri::from_parts(parts)?) + } + + pub fn init_error(&self) -> Result { + let mut parts: Parts = self.base.clone().into_parts(); + + let query = PathAndQuery::from_str("/2018-06-01/runtime/init/error")?; + parts.path_and_query = Some(query); + + Ok(Uri::from_parts(parts)?) + } + + pub fn ok_response(&self, event_id: String) -> Result { + let mut parts: Parts = self.base.clone().into_parts(); + + let query = format!("/2018-06-01/runtime/invocation/{}/response", event_id); + let query = PathAndQuery::from_str(&query)?; + parts.path_and_query = Some(query); + + Ok(Uri::from_parts(parts)?) + } + + pub fn err_response(&self, event_id: String) -> Result { + let mut parts: Parts = self.base.clone().into_parts(); + + let query = format!("/2018-06-01/runtime/invocation/{}/error", event_id); + let query = PathAndQuery::from_str(&query)?; + parts.path_and_query = Some(query); + + Ok(Uri::from_parts(parts)?) + } +} + +#[derive(Clone)] +struct RuntimeClient { + endpoint: Arc, + inner: Client, +} + +impl RuntimeClient { + pub fn new(base: Uri) -> Self { + Self { + endpoint: Endpoint::new(base), + inner: Client::new(), + } + } + + pub fn next_event(&self) -> FutureObj, Error> { + let uri = match self.endpoint.next_event() { + Ok(uri) => uri, + Err(e) => return Box::new(futures::future::err(e)), + }; + + Box::new(self.inner.get(uri).map_err(|e| e.into())) + } + + pub fn complete_event(&self, res: Result) -> FutureObj, Error> { + unimplemented!() + } +} + +// Tower's Service is a pleasant abstraction over Futures, clients, and services. +impl Service> for RuntimeClient { + type Response = Response; + type Error = Error; + type Future = Box + Send>; + + fn poll_ready(&mut self) -> Result, Self::Error> { + Ok(Async::Ready(())) + } + + fn call(&mut self, req: Request) -> Self::Future { + Box::new(self.inner.request(req).map_err(|e| e.into())) + } +} diff --git a/lambda-runtime-client-simple/src/settings.rs b/lambda-runtime-client-simple/src/settings.rs new file mode 100644 index 00000000..889b0a1f --- /dev/null +++ b/lambda-runtime-client-simple/src/settings.rs @@ -0,0 +1,27 @@ +use envy; + +#[derive(Serialize, Deserialize, Debug, Default)] +pub(crate) struct Config { + #[serde(rename = "AWS_LAMBDA_RUNTIME_API")] + pub endpoint: String, + #[serde(rename = "AWS_LAMBDA_FUNCTION_NAME")] + pub function_name: String, + #[serde(rename = "AWS_LAMBDA_FUNCTION_MEMORY_SIZE")] + pub memory: i32, + #[serde(rename = "AWS_LAMBDA_FUNCTION_VERSION")] + pub version: String, + #[serde(rename = "AWS_LAMBDA_LOG_STREAM_NAME")] + pub log_stream: String, + #[serde(rename = "AWS_LAMBDA_LOG_GROUP_NAME")] + pub log_group: String, +} + +impl Config { + pub(crate) fn from_env() -> Self { + Config { + endpoint: std::env::var("AWS_LAMBDA_RUNTIME_API").unwrap(), + function_name: std::env::var("AWS_LAMBDA_FUNCTION_NAME").unwrap(), + ..Config::default() + } + } +} diff --git a/lambda-runtime-client-simple/src/types.rs b/lambda-runtime-client-simple/src/types.rs new file mode 100644 index 00000000..00b27f44 --- /dev/null +++ b/lambda-runtime-client-simple/src/types.rs @@ -0,0 +1,363 @@ +use headers::{Header, HeaderMap, HeaderMapExt, HeaderName, HeaderValue}; +use lazy_static::lazy_static; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +lazy_static! { + static ref AWS_REQUEST_ID: HeaderName = + HeaderName::from_static("lambda-runtime-aws-request-id"); + static ref AWS_INVOCATION_DEADLINE: HeaderName = + HeaderName::from_static("lambda-runtime-deadline-ms"); + static ref AWS_FUNCTION_ARN: HeaderName = + HeaderName::from_static("lambda-runtime-invoked-function-arn"); + static ref AWS_XRAY_TRACE_ID: HeaderName = HeaderName::from_static("lambda-runtime-trace-id"); + static ref AWS_MOBILE_CLIENT_CONTEXT: HeaderName = + HeaderName::from_static("lambda-runtime-client-context"); + static ref AWS_MOBILE_CLIENT_IDENTITY: HeaderName = + HeaderName::from_static("lambda-runtime-cognito-identity"); +} + +macro_rules! str_header { + ($type:tt, $header_name:ident) => { + impl Header for $type { + fn name() -> &'static HeaderName { + &$header_name + } + + fn decode<'i, I>(values: &mut I) -> Result + where + I: Iterator, + { + let value = values + .next() + .and_then(|val| { + if let Ok(val) = val.to_str() { + return Some(String::from(val)); + } + None + }) + .ok_or_else(headers::Error::invalid)?; + Ok($type(value)) + } + + fn encode(&self, values: &mut E) + where + E: Extend, + { + let value = HeaderValue::from_str(&self.0).expect("Should not panic on encoding"); + values.extend(std::iter::once(value)); + } + } + }; +} + +macro_rules! num_header { + ($type:tt, $header_name:ident) => { + impl Header for $type { + fn name() -> &'static HeaderName { + &$header_name + } + + fn decode<'i, I>(values: &mut I) -> Result + where + I: Iterator, + { + let value = values + .next() + .and_then(|val| { + if let Ok(val) = val.to_str() { + if let Ok(val) = val.parse::() { + return Some(val); + } + } + None + }) + .ok_or_else(headers::Error::invalid)?; + Ok($type(value)) + } + + fn encode(&self, values: &mut E) + where + E: Extend, + { + let value = HeaderValue::from_str(&self.0.to_string()) + .expect("Should not panic on encoding"); + values.extend(std::iter::once(value)); + } + } + }; +} + +/// The request ID, which identifies the request that triggered the function invocation. This header +/// tracks the invocation within the Lambda control plane. The request ID is used to specify completion +/// of a given invocation. +#[derive(Debug, Clone, PartialEq)] +pub struct RequestId(pub String); +str_header!(RequestId, AWS_REQUEST_ID); + +/// The date that the function times out in Unix time milliseconds. For example, `1542409706888`. +#[derive(Debug, Clone, PartialEq)] +pub struct InvocationDeadline(pub u64); +num_header!(InvocationDeadline, AWS_INVOCATION_DEADLINE); + +/// The ARN of the Lambda function, version, or alias that is specified in the invocation. +/// For instance, `arn:aws:lambda:us-east-2:123456789012:function:custom-runtime`. +#[derive(Debug, Clone, PartialEq)] +pub struct FunctionArn(pub String); +str_header!(FunctionArn, AWS_FUNCTION_ARN); + +/// The AWS X-Ray Tracing header. For more information, +/// please see [AWS' documentation](https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader). +#[derive(Debug, Clone, PartialEq)] +pub struct XRayTraceId(pub String); +str_header!(XRayTraceId, AWS_XRAY_TRACE_ID); + +/// For invocations from the AWS Mobile SDK contains data about client application and device. +#[derive(Debug, Clone, PartialEq)] +struct MobileClientContext(String); +str_header!(MobileClientContext, AWS_MOBILE_CLIENT_CONTEXT); + +/// For invocations from the AWS Mobile SDK, data about the Amazon Cognito identity provider. +#[derive(Debug, Clone, PartialEq)] +struct MobileClientIdentity(String); +str_header!(MobileClientIdentity, AWS_MOBILE_CLIENT_IDENTITY); + +/// Client context sent by the AWS Mobile SDK. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ClientContext { + /// Information about the mobile application invoking the function. + pub client: ClientApplication, + /// Custom properties attached to the mobile event context. + pub custom: HashMap, + /// Environment settings from the mobile client. + pub environment: HashMap, +} + +/// AWS Mobile SDK client fields. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[serde(rename_all = "camelCase")] +pub struct ClientApplication { + /// The mobile app installation id + pub installation_id: String, + /// The app title for the mobile app as registered with AWS' mobile services. + pub app_title: String, + /// The version name of the application as registered with AWS' mobile services. + pub app_version_name: String, + /// The app version code. + pub app_version_code: String, + /// The package name for the mobile application invoking the function + pub app_package_name: String, +} + +/// Cognito identity information sent with the event +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct CognitoIdentity { + /// The unique identity id for the Cognito credentials invoking the function. + pub identity_id: String, + /// The identity pool id the caller is "registered" with. + pub identity_pool_id: String, +} + +/// The Lambda function execution context. The values in this struct +/// are populated using the [Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html) +/// and the headers returned by the poll request to the Runtime APIs. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default)] +pub struct Context { + /// The AWS request ID generated by the Lambda service. + pub aws_request_id: String, + /// The execution deadline for the current invocation in milliseconds. + pub deadline: u64, + /// The ARN of the Lambda function being invoked. + pub invoked_function_arn: String, + /// The X-Ray trace ID for the current invocation. + pub xray_trace_id: Option, + /// The client context object sent by the AWS mobile SDK. This field is + /// empty unless the function is invoked using an AWS mobile SDK. + pub client_context: Option, + /// The Cognito identity that invoked the function. This field is empty + /// unless the invocation request to the Lambda APIs was made using AWS + /// credentials issues by Amazon Cognito Identity Pools. + pub identity: Option, +} + +impl Context { + pub fn new(headers: HeaderMap) -> Option { + let request_id = headers.typed_get::()?; + let function_arn = headers.typed_get::()?; + let deadline = headers.typed_get::()?; + let xray = headers.typed_get::(); + + let ctx = Context { + aws_request_id: request_id.0, + deadline: deadline.0, + invoked_function_arn: function_arn.0, + xray_trace_id: xray.map(|v| v.0), + ..Default::default() + }; + Some(ctx) + } +} + +#[cfg(test)] +mod tests { + use crate::types::{ + ClientApplication, ClientContext, CognitoIdentity, FunctionArn, InvocationDeadline, + MobileClientContext, MobileClientIdentity, RequestId, XRayTraceId, + }; + use bytes::Bytes; + use headers::{HeaderMap, HeaderMapExt}; + use http::Response; + use proptest::{collection, option, prelude::*, strategy::Strategy, string::string_regex}; + + fn gen_request_id() -> impl Strategy { + let expr = "[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}"; + let arbitrary_uuid = string_regex(expr).unwrap(); + arbitrary_uuid.prop_map(RequestId) + } + + fn gen_invocation_deadline() -> impl Strategy { + any::().prop_map(InvocationDeadline) + } + + fn gen_function_arn() -> impl Strategy { + let expr = "arn:aws:lambda:us-east-1:[0-9]{12}:function:custom-runtime"; + let arn = string_regex(expr).unwrap(); + arn.prop_map(FunctionArn) + } + + fn gen_xray_trace_id() -> impl Strategy { + let expr = "Root=1-[a-zA-Z0-9]{32};Parent=[a-z0-9]{16};Sampled=[0-1]{1}"; + let xray = string_regex(expr).unwrap(); + xray.prop_map(XRayTraceId) + } + + fn uuid() -> impl Strategy { + let expr = "[a-zA-Z0-9]{32}"; + string_regex(expr).unwrap() + } + + fn gen_client_context() -> impl Strategy { + uuid().prop_map(MobileClientContext) + } + + fn gen_client_identity() -> impl Strategy { + uuid().prop_map(MobileClientIdentity) + } + + fn gen_client_identity_struct() -> impl Strategy { + (uuid()).prop_map(|uuid| CognitoIdentity { + identity_id: uuid.clone(), + identity_pool_id: uuid, + }) + } + + fn gen_client_application() -> impl Strategy { + (uuid()).prop_map(|uuid| ClientApplication { + installation_id: uuid.clone(), + app_title: uuid.clone(), + app_version_name: uuid.clone(), + app_version_code: uuid.clone(), + app_package_name: uuid, + }) + } + + fn gen_client_context_struct() -> impl Strategy { + let app = gen_client_application(); + let overrides = collection::hash_map(uuid(), uuid(), 1..10); + let env = collection::hash_map(uuid(), uuid(), 1..10); + (app, overrides, env).prop_map(|args| { + let (app, overrides, env) = args; + ClientContext { + client: app, + custom: overrides, + environment: env, + } + }) + } + + fn gen_headers() -> impl Strategy { + let mandatory = ( + gen_request_id(), + gen_invocation_deadline(), + gen_function_arn(), + ); + let xray = option::of(gen_xray_trace_id()); + let mobile = option::of((gen_client_context(), gen_client_identity())); + (mandatory, xray, mobile).prop_map(|headers| { + let (mandatory, xray, mobile) = headers; + let mut map = HeaderMap::new(); + map.typed_insert(mandatory.0); + map.typed_insert(mandatory.1); + map.typed_insert(mandatory.2); + xray.map(|xray| map.typed_insert(xray)); + mobile.map(|mobile| { + map.typed_insert(mobile.0); + map.typed_insert(mobile.1) + }); + map + }) + } + + fn gen_next_event() -> impl Strategy> { + gen_headers().prop_map(|headers| { + let mut resp = Response::new(Bytes::default()); + *resp.headers_mut() = headers; + *resp.status_mut() = http::StatusCode::OK; + resp + }) + } + + #[test] + fn request_id() { + proptest!(|(req in gen_request_id())| { + let mut headers = HeaderMap::new(); + headers.typed_insert(req.clone()); + prop_assert_eq!(headers.typed_get::(), Some(req)); + }); + } + + #[test] + fn deadline() { + proptest!(|(req in gen_invocation_deadline())| { + let mut headers = HeaderMap::new(); + headers.typed_insert(req.clone()); + prop_assert_eq!(headers.typed_get::(), Some(req)); + }); + } + + #[test] + fn function_arn() { + proptest!(|(req in gen_function_arn())| { + let mut headers = HeaderMap::new(); + headers.typed_insert(req.clone()); + prop_assert_eq!(headers.typed_get::(), Some(req)); + }); + } + + #[test] + fn xray_trace_id() { + proptest!(|(req in gen_xray_trace_id())| { + let mut headers = HeaderMap::new(); + headers.typed_insert(req.clone()); + prop_assert_eq!(headers.typed_get::(), Some(req)); + }); + } + + #[test] + fn mobile_client_context() { + proptest!(|(req in gen_client_context())| { + let mut headers = HeaderMap::new(); + headers.typed_insert(req.clone()); + prop_assert_eq!(headers.typed_get::(), Some(req)); + }); + } + + #[test] + fn mobile_client_identity() { + proptest!(|(req in gen_client_identity())| { + let mut headers = HeaderMap::new(); + headers.typed_insert(req.clone()); + prop_assert_eq!(headers.typed_get::(), Some(req)); + }); + } +} diff --git a/lambda-runtime-client/src/client.rs b/lambda-runtime-client/src/client.rs index f87a2d2c..1eebd126 100644 --- a/lambda-runtime-client/src/client.rs +++ b/lambda-runtime-client/src/client.rs @@ -242,7 +242,10 @@ impl RuntimeClient { Ok(()) } Err(e) => { - error!("Error when calling runtime API for request {}: {}", request_id, e); + error!( + "Error when calling runtime API for request {}: {}", + request_id, e + ); Err(ApiError::from(e)) } } @@ -290,7 +293,10 @@ impl RuntimeClient { Ok(()) } Err(e) => { - error!("Error when calling runtime API for request {}: {}", request_id, e); + error!( + "Error when calling runtime API for request {}: {}", + request_id, e + ); Err(ApiError::from(e)) } } @@ -308,10 +314,16 @@ impl RuntimeClient { /// If it cannot send the init error. In this case we panic to force the runtime /// to restart. pub fn fail_init(&self, e: &dyn RuntimeApiError) { - let uri: Uri = format!("http://{}/{}/runtime/init/error", self.endpoint, RUNTIME_API_VERSION) - .parse() - .expect("Could not generate Runtime URI"); - error!("Calling fail_init Runtime API: {}", e.to_response().error_message); + let uri: Uri = format!( + "http://{}/{}/runtime/init/error", + self.endpoint, RUNTIME_API_VERSION + ) + .parse() + .expect("Could not generate Runtime URI"); + error!( + "Calling fail_init Runtime API: {}", + e.to_response().error_message + ); let req = self.get_runtime_error_request(&uri, &e.to_response()); self.http_client @@ -322,7 +334,10 @@ impl RuntimeClient { panic!("Error while sending init failed message: {}", e); }) .map(|resp| { - info!("Successfully sent error response to the runtime API: {:?}", resp); + info!( + "Successfully sent error response to the runtime API: {:?}", + resp + ); }) .expect("Could not complete init_fail request"); } @@ -348,7 +363,10 @@ impl RuntimeClient { Request::builder() .method(Method::POST) .uri(uri.clone()) - .header(header::CONTENT_TYPE, header::HeaderValue::from_static(API_CONTENT_TYPE)) + .header( + header::CONTENT_TYPE, + header::HeaderValue::from_static(API_CONTENT_TYPE), + ) .body(Body::from(body)) .unwrap() } @@ -362,7 +380,10 @@ impl RuntimeClient { header::CONTENT_TYPE, header::HeaderValue::from_static(API_ERROR_CONTENT_TYPE), ) - .header(RUNTIME_ERROR_HEADER, HeaderValue::from_static("RuntimeError")) // TODO: We should add this code to the error object. + .header( + RUNTIME_ERROR_HEADER, + HeaderValue::from_static("RuntimeError"), + ) // TODO: We should add this code to the error object. .body(Body::from(body)) .unwrap() } @@ -378,14 +399,20 @@ impl RuntimeClient { /// A `Result` containing the populated `EventContext` or an `ApiError` if the required headers /// were not present or the client context and cognito identity could not be parsed from the /// JSON string. - fn get_event_context(&self, headers: &HeaderMap) -> Result { + fn get_event_context( + &self, + headers: &HeaderMap, + ) -> Result { // let headers = resp.headers(); let aws_request_id = match headers.get(LambdaHeaders::RequestId.as_str()) { Some(value) => value.to_str()?.to_owned(), None => { error!("Response headers do not contain request id header"); - return Err(ApiError::new(&format!("Missing {} header", LambdaHeaders::RequestId))); + return Err(ApiError::new(&format!( + "Missing {} header", + LambdaHeaders::RequestId + ))); } }; @@ -393,7 +420,10 @@ impl RuntimeClient { Some(value) => value.to_str()?.to_owned(), None => { error!("Response headers do not contain function arn header"); - return Err(ApiError::new(&format!("Missing {} header", LambdaHeaders::FunctionArn))); + return Err(ApiError::new(&format!( + "Missing {} header", + LambdaHeaders::FunctionArn + ))); } }; @@ -401,7 +431,10 @@ impl RuntimeClient { Some(value) => value.to_str()?.to_owned(), None => { error!("Response headers do not contain trace id header"); - return Err(ApiError::new(&format!("Missing {} header", LambdaHeaders::TraceId))); + return Err(ApiError::new(&format!( + "Missing {} header", + LambdaHeaders::TraceId + ))); } }; @@ -409,7 +442,10 @@ impl RuntimeClient { Some(value) => value.to_str()?.parse()?, None => { error!("Response headers do not contain deadline header"); - return Err(ApiError::new(&format!("Missing {} header", LambdaHeaders::Deadline))); + return Err(ApiError::new(&format!( + "Missing {} header", + LambdaHeaders::Deadline + ))); } }; @@ -431,7 +467,10 @@ impl RuntimeClient { if let Some(cognito_json) = headers.get(LambdaHeaders::CognitoIdentity.as_str()) { let cognito_json = cognito_json.to_str()?; - trace!("Found Cognito Identity in response headers: {}", cognito_json); + trace!( + "Found Cognito Identity in response headers: {}", + cognito_json + ); let identity_value: CognitoIdentity = serde_json::from_str(&cognito_json)?; ctx.identity = Option::from(identity_value); }; diff --git a/lambda-runtime-client/src/error.rs b/lambda-runtime-client/src/error.rs index 6dd5356e..6b49c30f 100644 --- a/lambda-runtime-client/src/error.rs +++ b/lambda-runtime-client/src/error.rs @@ -175,7 +175,10 @@ impl From for ApiError { impl RuntimeApiError for ApiError { fn to_response(&self) -> ErrorResponse { let backtrace = format!("{:?}", self.backtrace); - let trace_vec = backtrace.lines().map(|s| s.to_string()).collect::>(); + let trace_vec = backtrace + .lines() + .map(|s| s.to_string()) + .collect::>(); let mut err = ErrorResponse::unhandled(self.msg.clone()); err.stack_trace = Option::from(trace_vec); diff --git a/lambda-runtime/Cargo.toml b/lambda-runtime/Cargo.toml index ef1cf7ec..cc5b1758 100644 --- a/lambda-runtime/Cargo.toml +++ b/lambda-runtime/Cargo.toml @@ -17,8 +17,8 @@ maintenance = { status = "actively-developed" } [dependencies] serde = "^1" -serde_json = "^1" serde_derive = "^1" +serde_json = "^1" log = "^0.4" hyper = "^0.12" tokio = "^0.1" diff --git a/lambda-runtime/src/error.rs b/lambda-runtime/src/error.rs index 975d7919..adde610a 100644 --- a/lambda-runtime/src/error.rs +++ b/lambda-runtime/src/error.rs @@ -71,7 +71,12 @@ impl error::RuntimeApiError for RuntimeError { error::ErrorResponse { error_message: String::from(self.description()), error_type: String::from(error::ERROR_TYPE_HANDLED), - stack_trace: Option::from(backtrace.lines().map(|s| s.to_string()).collect::>()), + stack_trace: Option::from( + backtrace + .lines() + .map(|s| s.to_string()) + .collect::>(), + ), } } } @@ -174,7 +179,12 @@ impl error::RuntimeApiError for HandlerError { error::ErrorResponse { error_message: String::from(self.description()), error_type: String::from(error::ERROR_TYPE_HANDLED), - stack_trace: Option::from(backtrace.lines().map(|s| s.to_string()).collect::>()), + stack_trace: Option::from( + backtrace + .lines() + .map(|s| s.to_string()) + .collect::>(), + ), } } } diff --git a/lambda-runtime/src/runtime.rs b/lambda-runtime/src/runtime.rs index caac0983..26d4b017 100644 --- a/lambda-runtime/src/runtime.rs +++ b/lambda-runtime/src/runtime.rs @@ -73,8 +73,11 @@ macro_rules! lambda { /// The function panics if the `ConfigProvider` returns an error from the `get_runtime_api_endpoint()` /// or `get_function_settings()` methods. The panic forces AWS Lambda to terminate the environment /// and spin up a new one for the next invocation. -pub(crate) fn start_with_config(f: impl Handler, config: &C, runtime: Option) -where +pub(crate) fn start_with_config( + f: impl Handler, + config: &C, + runtime: Option, +) where E: serde::de::DeserializeOwned, O: serde::Serialize, C: ConfigProvider, @@ -212,12 +215,20 @@ where ); match serde_json::to_vec(&response) { Ok(response_bytes) => { - match self.runtime_client.event_response(&request_id, response_bytes) { - Ok(_) => info!("Response for {} accepted by Runtime API", request_id), + match self + .runtime_client + .event_response(&request_id, response_bytes) + { + Ok(_) => { + info!("Response for {} accepted by Runtime API", request_id) + } // unrecoverable error while trying to communicate with the endpoint. // we let the Lambda Runtime API know that we have died Err(e) => { - error!("Could not send response for {} to Runtime API: {}", request_id, e); + error!( + "Could not send response for {} to Runtime API: {}", + request_id, e + ); if !e.recoverable { error!( "Error for {} is not recoverable, sending fail_init signal and panicking.", @@ -242,11 +253,17 @@ where } Err(e) => { debug!("Handler returned an error for {}: {}", request_id, e); - debug!("Attempting to send error response to Runtime API for {}", request_id); + debug!( + "Attempting to send error response to Runtime API for {}", + request_id + ); match self.runtime_client.event_error(&request_id, &e) { Ok(_) => info!("Error response for {} accepted by Runtime API", request_id), Err(e) => { - error!("Unable to send error response for {} to Runtime API: {}", request_id, e); + error!( + "Unable to send error response for {} to Runtime API: {}", + request_id, e + ); if !e.recoverable { error!( "Error for {} is not recoverable, sending fail_init signal and panicking", @@ -338,7 +355,9 @@ pub(crate) mod tests { None, ) .expect("Could not initialize client"); - let handler = |_e: String, _c: context::Context| -> Result { Ok("hello".to_string()) }; + let handler = |_e: String, _c: context::Context| -> Result { + Ok("hello".to_string()) + }; let retries: i8 = 3; let runtime = Runtime::new( handler, @@ -364,6 +383,10 @@ pub(crate) mod tests { output.err().unwrap() ); let output_string = output.unwrap(); - assert_eq!(output_string, "hello", "Unexpected output message: {}", output_string); + assert_eq!( + output_string, "hello", + "Unexpected output message: {}", + output_string + ); } }