Struct kubewarden_policy_sdk::cluster_context::ClusterContext [−][src]
A ClusterContext
allows a waPC guest policy to retrieve cluster
contextual information from a Kubernetes cluster.
Right now a set of well known resources is hardcoded, but the idea is to generalize this so the SDK can support any kind of Kubernetes resource and custom resource definition.
Implementations
impl ClusterContext
[src]
pub fn ingresses(namespace: NamespaceFilter) -> Result<Vec<Ingress>>
[src]
Return the list of Ingress
resources that exist in the
cluster.
pub fn namespaces() -> Result<Vec<Namespace>>
[src]
Return the list of Namespace
resources that exist in the
cluster.
pub fn services(namespace: NamespaceFilter) -> Result<Vec<Service>>
[src]
Return the list of Service
resources that exist in the
cluster.
impl ClusterContext
[src]
pub fn ingress(namespace: NamespaceFilter, name: &str) -> Result<Vec<Ingress>>
[src]
Return a specific ingress object with a given name and a namespace filter. If the namespace filter is broad, more than one resource might be returned.
pub fn namespace(name: &str) -> Result<Option<Namespace>>
[src]
pub fn service(namespace: NamespaceFilter, name: &str) -> Result<Vec<Service>>
[src]
Return a specific service object with a given name and a namespace filter. If the namespace filter is broad, more than one resource might be returned.
Auto Trait Implementations
impl RefUnwindSafe for ClusterContext
impl Send for ClusterContext
impl Sync for ClusterContext
impl Unpin for ClusterContext
impl UnwindSafe for ClusterContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,