Struct kubewatch::Cluster
[−]
[src]
pub struct Cluster { /* fields omitted */ }
Represents connection to Kubernetes API server.
Methods
impl Cluster
[src]
fn new(host: &str) -> Result<Cluster, Error>
Initialize Cluster
with host address and port (e.g. http://127.0.0.1:8080).
let cluster = kubewatch::Cluster::new("http://127.0.0.1:8080").unwrap();
Trait Implementations
impl Debug for Cluster
[src]
impl Events for Cluster
[src]
Read event monitor from Kubernetes API server.
fn events<Event>(
&self,
name: &str
) -> Result<Receiver<Result<Event, Error>>, Error> where
Event: Deserialize + Send + 'static,
&self,
name: &str
) -> Result<Receiver<Result<Event, Error>>, Error> where
Event: Deserialize + Send + 'static,
Read monitor of events with given name
and return them as given Event
structure.
fn generator<Event, Iter>(&self, iter: Iter) -> Receiver<Result<Event, Error>> where
Event: Deserialize + Send + 'static,
Iter: Iterator<Item = Result<u8>> + Send + 'static,
Event: Deserialize + Send + 'static,
Iter: Iterator<Item = Result<u8>> + Send + 'static,
Helper which reads a byte iterator, deserializes it and return respective structures.