Crates.io | kubewatch |
lib.rs | kubewatch |
version | 0.9.2 |
source | src |
created_at | 2017-02-13 22:24:07.452446 |
updated_at | 2017-03-08 16:52:27.150593 |
description | This library serves as a base component for Kubernetes event watching. |
homepage | https://github.com/phoracek/kubewatch |
repository | https://github.com/phoracek/kubewatch |
max_upload_size | |
id | 8508 |
size | 9,078 |
This library serves as a base component for Kubernetes event watching. It allows user to specify which resource should be monitored. Deserialization of events is done via Serde, thanks to it it is possible to use both dynamic on-the-fly deserialization and also beforehand generated Deserializer for specific structure.
extern crate kubewatch;
extern crate serde_json;
use kubewatch::Events;
fn main() {
let cluster = kubewatch::Cluster::new("http://localhost:8080").unwrap();
let events = cluster.events::<serde_json::Value>("api/v1/pods").unwrap();
for event in events.into_iter() {
println!("{:#?}", event);
}
}
Check for more in examples/
.