Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Commit

Permalink
get STATSD_HOST from the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
matsadler committed Apr 26, 2018
1 parent ec73dce commit b45082a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "avvoenv"
version = "0.4.0"
version = "0.4.1"
authors = ["Avvo Infrastructure Team <[email protected]>"]
license = "MIT"

Expand Down
9 changes: 7 additions & 2 deletions src/avvoenv/rancher_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ struct Container {

#[derive(Deserialize)]
struct Host {
hostname: String,
labels: Labels,
}

#[derive(Deserialize)]
struct Labels {
fqdn: String,
}

#[derive(Deserialize)]
Expand All @@ -34,7 +39,7 @@ impl std::iter::IntoIterator for Info {
fn into_iter(self) -> Self::IntoIter {
vec![
(String::from("RANCHER_IP"), self.container.primary_ip),
(String::from("STATSD_HOST"), self.host.hostname),
(String::from("STATSD_HOST"), self.host.labels.fqdn),
].into_iter()
}
}
Expand Down

0 comments on commit b45082a

Please sign in to comment.