Add pod-based metric_labels to destinations response (#429) (#654)

* Extracted logic from destination server
* Make tests follow style used elsewhere in the code
* Extract single interface for resolvers
* Add tests for k8s and ipv4 resolvers
* Fix small usability issues
* Update dep
* Act on feedback
* Add pod-based metric_labels to destinations response
* Add documentation on running control plane to BUILD.md

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Fix mock controller in proxy tests (#656)

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* Address review feedback
* Rename files in the destination package

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
This commit is contained in:
Phil Calçado 2018-04-02 21:36:57 -04:00 committed by Kevin Lingerfelt
parent 7071aefafa
commit b8f5e41e31
1 changed files with 4 additions and 0 deletions

View File

@ -281,8 +281,10 @@ pub fn destination_update(addr: SocketAddr) -> pb::destination::Update {
port: u32::from(addr.port()),
}),
weight: 0,
..Default::default()
},
],
..Default::default()
},
)),
}
@ -293,6 +295,7 @@ pub fn destination_add_none() -> pb::destination::Update {
update: Some(pb::destination::update::Update::Add(
pb::destination::WeightedAddrSet {
addrs: Vec::new(),
..Default::default()
},
)),
}
@ -303,6 +306,7 @@ pub fn destination_remove_none() -> pb::destination::Update {
update: Some(pb::destination::update::Update::Remove(
pb::destination::AddrSet {
addrs: Vec::new(),
..Default::default()
},
)),
}