commit
f20203aefd
4 changed files with 589 additions and 0 deletions
@ -0,0 +1,2 @@ |
|||
/target |
|||
**/*.rs.bk |
|||
@ -0,0 +1,512 @@ |
|||
[[package]] |
|||
name = "aho-corasick" |
|||
version = "0.6.9" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "base64" |
|||
version = "0.9.3" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "byteorder" |
|||
version = "1.2.7" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "bytesize" |
|||
version = "0.1.3" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "cfg-if" |
|||
version = "0.1.6" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "chrono" |
|||
version = "0.4.6" |
|||
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.41 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "groupable" |
|||
version = "0.2.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "httparse" |
|||
version = "1.3.3" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "hyper" |
|||
version = "0.10.15" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "idna" |
|||
version = "0.1.5" |
|||
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)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "itoa" |
|||
version = "0.4.3" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "language-tags" |
|||
version = "0.2.2" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "lazy_static" |
|||
version = "1.2.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "libc" |
|||
version = "0.2.45" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "loadapi_server" |
|||
version = "0.1.0" |
|||
dependencies = [ |
|||
"nickel 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"systemstat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "log" |
|||
version = "0.3.9" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "log" |
|||
version = "0.4.6" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "matches" |
|||
version = "0.1.8" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "memchr" |
|||
version = "1.0.2" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "memchr" |
|||
version = "2.1.2" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "mime" |
|||
version = "0.2.6" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "modifier" |
|||
version = "0.1.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "mustache" |
|||
version = "0.8.2" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "nickel" |
|||
version = "0.10.2" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"mustache 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "nom" |
|||
version = "3.2.1" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "num-integer" |
|||
version = "0.1.39" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "num-traits" |
|||
version = "0.2.6" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "num_cpus" |
|||
version = "1.9.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "percent-encoding" |
|||
version = "1.0.1" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "plugin" |
|||
version = "0.2.6" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "proc-macro2" |
|||
version = "0.4.24" |
|||
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 = "quote" |
|||
version = "0.6.10" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "redox_syscall" |
|||
version = "0.1.44" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "regex" |
|||
version = "1.1.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"regex-syntax 0.6.4 (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.4" |
|||
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 = "rustc-serialize" |
|||
version = "0.3.24" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "ryu" |
|||
version = "0.2.7" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "safemem" |
|||
version = "0.3.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "serde" |
|||
version = "1.0.82" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "serde_derive" |
|||
version = "1.0.82" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "serde_json" |
|||
version = "1.0.33" |
|||
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.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "syn" |
|||
version = "0.15.23" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"quote 0.6.10 (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 = "systemstat" |
|||
version = "0.1.3" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"bytesize 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"time 0.1.41 (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.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "time" |
|||
version = "0.1.41" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"redox_syscall 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "traitobject" |
|||
version = "0.1.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "typeable" |
|||
version = "0.1.2" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "typemap" |
|||
version = "0.3.3" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"unsafe-any 0.4.2 (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 = "1.4.2" |
|||
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" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "unicode-normalization" |
|||
version = "0.1.7" |
|||
source = "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 = "unsafe-any" |
|||
version = "0.4.2" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "url" |
|||
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)", |
|||
"matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[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 = "winapi" |
|||
version = "0.3.6" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
dependencies = [ |
|||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|||
] |
|||
|
|||
[[package]] |
|||
name = "winapi-i686-pc-windows-gnu" |
|||
version = "0.4.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[[package]] |
|||
name = "winapi-x86_64-pc-windows-gnu" |
|||
version = "0.4.0" |
|||
source = "registry+https://github.com/rust-lang/crates.io-index" |
|||
|
|||
[metadata] |
|||
"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" |
|||
"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" |
|||
"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" |
|||
"checksum bytesize 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "16d794c5fe594cfa8fbe8ae274de4048176c69f2d9ac5e637166e73b71d460b8" |
|||
"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" |
|||
"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" |
|||
"checksum groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" |
|||
"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" |
|||
"checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" |
|||
"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" |
|||
"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" |
|||
"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" |
|||
"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" |
|||
"checksum libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2857ec59fadc0773853c664d2d18e7198e83883e7060b63c924cb077bd5c74" |
|||
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" |
|||
"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 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" |
|||
"checksum memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db4c41318937f6e76648f42826b1d9ade5c09cafb5aef7e351240a70f39206e9" |
|||
"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" |
|||
"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" |
|||
"checksum mustache 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb004e419334fc9172d0a5ff91c0770bdd6239091b0b343eb5926101f0a7d13" |
|||
"checksum nickel 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da8f6d24c912e56ae0b595fed54326dc49e8d7c8a13f303861fd0c2c3021e746" |
|||
"checksum nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" |
|||
"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.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" |
|||
"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" |
|||
"checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" |
|||
"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" |
|||
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" |
|||
"checksum redox_syscall 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "a84bcd297b87a545980a2d25a0beb72a1f490c31f0a9fde52fca35bfbb1ceb70" |
|||
"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" |
|||
"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1" |
|||
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" |
|||
"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" |
|||
"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" |
|||
"checksum serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)" = "6fa52f19aee12441d5ad11c9a00459122bd8f98707cadf9778c540674f1935b6" |
|||
"checksum serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)" = "96a7f9496ac65a2db5929afa087b54f8fc5008dcfbe48a8874ed20049b0d6154" |
|||
"checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" |
|||
"checksum syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9545a6a093a3f0bd59adb472700acc08cad3776f860f16a897dfce8c88721cbc" |
|||
"checksum systemstat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "73ea86765e7360e93672afc2b2eb81df13653a8ca2343f6c525e77a4d1d8bdf3" |
|||
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" |
|||
"checksum time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "847da467bf0db05882a9e2375934a8a55cffdc9db0d128af1518200260ba1f6c" |
|||
"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" |
|||
"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" |
|||
"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" |
|||
"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" |
|||
"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" |
|||
"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-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" |
|||
"checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" |
|||
"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 winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" |
|||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" |
|||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" |
|||
@ -0,0 +1,11 @@ |
|||
[package] |
|||
name = "loadapi_server" |
|||
version = "0.1.0" |
|||
authors = ["Mathieu Demange <contact@mathieudemange.fr>"] |
|||
|
|||
[dependencies] |
|||
nickel = "*" |
|||
systemstat = "*" |
|||
serde = "*" |
|||
serde_json = "*" |
|||
serde_derive = "*" |
|||
@ -0,0 +1,64 @@ |
|||
#[macro_use] extern crate nickel; |
|||
extern crate systemstat; |
|||
extern crate serde_json; |
|||
extern crate serde; |
|||
#[macro_use] extern crate serde_derive; |
|||
|
|||
use nickel::Nickel; |
|||
use nickel::MediaType; |
|||
use systemstat::{System, Platform}; |
|||
//extern crate rustc_serialize;
|
|||
|
|||
#[derive(Serialize, Deserialize, Debug)] |
|||
struct LoadInformation { |
|||
oneMinute: f32, |
|||
fiveMinutes: f32, |
|||
fifteenMinutes: f32 |
|||
} |
|||
|
|||
fn main() { |
|||
|
|||
let mut server = Nickel::new(); |
|||
|
|||
server.utilize(router! { |
|||
|
|||
get "/load" => |_req, mut _res| { |
|||
|
|||
_res.set(MediaType::Json); |
|||
|
|||
let sys = System::new(); |
|||
|
|||
match sys.load_average() { |
|||
|
|||
Ok(loadavg) => { |
|||
|
|||
let result = LoadInformation { |
|||
oneMinute: loadavg.one, |
|||
fiveMinutes: loadavg.five, |
|||
fifteenMinutes: loadavg.fifteen |
|||
}; |
|||
|
|||
serde_json::to_string(&result).unwrap() |
|||
|
|||
}, |
|||
|
|||
|
|||
|
|||
Err(x) => { |
|||
|
|||
//serde_json::to_string(&result).unwrap()
|
|||
String::from("Failure") |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
get "**" => |_req, _res| { |
|||
"Hello world!" |
|||
} |
|||
}); |
|||
|
|||
server.listen("127.0.0.1:6767"); |
|||
} |
|||
Loading…
Reference in new issue