pub struct Kubeapi { /* private fields */ }
Expand description
Kubeapi is a higher-level Kubernetes API client that provides additional features such as caching, namespace management, and easier access to common Kubernetes resources.
Implementations§
Source§impl Kubeapi
impl Kubeapi
pub async fn kubeconfig( options: KubeConfigOptions, debug: bool, ) -> Result<(Config, Kubeconfig), KubeconfigError>
pub fn current_context(&self) -> Result<()>
pub fn get_clusters(&self) -> Result<()>
pub fn get_contexts(&self) -> Result<()>
pub fn get_users(&self) -> Result<()>
pub fn view(&self) -> Result<()>
Source§impl Kubeapi
impl Kubeapi
pub async fn server_api_groups(&self) -> Result<APIGroupList>
pub async fn server_api_resources(&self) -> Result<Vec<APIResourceList>>
Source§impl Kubeapi
impl Kubeapi
pub async fn new( config: &KubeConfigOptions, options: &KubeapiOptions, debug: bool, ) -> Result<Self>
pub fn cluster_url(&self) -> String
pub fn debug(&self, item: impl Debug)
Sourcepub fn with_namespace(self, namespace: Namespace) -> Self
pub fn with_namespace(self, namespace: Namespace) -> Self
Set the namespace for the Kubeapi instance. This method returns a new instance with the updated namespace.
pub fn show_namespace(&self) -> bool
pub fn cached_server_api_resources(&self) -> Vec<APIResourceList>
pub async fn server_preferred_resources(&self) -> Result<Vec<APIResourceList>>
pub async fn api_versions(&self) -> Result<()>
pub fn dynamic_object_api( &self, scope: Scope, dyntype: &ApiResource, ) -> Result<Api<DynamicObject>>
pub fn get_params(&self) -> GetParams
pub fn list_params(&self) -> ListParams
pub fn post_params(&self) -> PostParams
pub fn delete_params(&self, cascade: Cascade, dry_run: DryRun) -> DeleteParams
pub fn post_params_with_manager(&self, manager: &str) -> PostParams
pub fn clusterroles(&self) -> Result<Api<ClusterRole>>
pub fn namespaces(&self) -> Result<Api<Namespace>>
pub fn pods(&self) -> Result<Api<Pod>>
pub fn configmaps(&self) -> Result<Api<ConfigMap>>
pub fn secrets(&self) -> Result<Api<Secret>>
pub fn componentstatuses(&self) -> Result<Api<ComponentStatus>>
pub fn nodes(&self) -> Result<Api<Node>>
pub fn selfsubjectaccessreviews(&self) -> Result<Api<SelfSubjectAccessReview>>
pub fn selfsubjectrulesreviews(&self) -> Result<Api<SelfSubjectRulesReview>>
pub fn selfsubjectreviews(&self) -> Result<Api<SelfSubjectReview>>
pub fn inspect<K>(&self, k: &K)where
K: Serialize,
pub fn inspect_err(&self, err: &Error)
pub fn full_name<K>(&self, k: &K) -> String
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Kubeapi
impl RefUnwindSafe for Kubeapi
impl Send for Kubeapi
impl Sync for Kubeapi
impl Unpin for Kubeapi
impl UnwindSafe for Kubeapi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more