Struct kube::Api [−][src]
pub struct Api<K> { /* fields omitted */ }
Expand description
An easy Api interaction helper
The upsides of working with this rather than a Resource
directly are:
- easiers serialization interface (no figuring out return types)
- client hidden within, less arguments
But the downsides are:
- openapi types can take up a large amount of memory
- openapi types can be annoying to wrangle with their heavy Option use
- no control over requests (opinionated)
Implementations
impl<K> Api<K> where
K: Resource,
[src]
impl<K> Api<K> where
K: Resource,
[src]Expose same interface as Api for controlling scope/group/versions/ns
impl<K> Api<K> where
K: Clone + DeserializeOwned + Meta,
[src]
impl<K> Api<K> where
K: Clone + DeserializeOwned + Meta,
[src]PUSH/PUT/POST/GET abstractions
pub async fn get(&self, name: &str) -> Result<K>
[src]
pub async fn create(&self, pp: &PostParams, data: &K) -> Result<K> where
K: Serialize,
[src]
K: Serialize,
pub async fn delete(
&self,
name: &str,
dp: &DeleteParams
) -> Result<Either<K, Status>>
[src]
&self,
name: &str,
dp: &DeleteParams
) -> Result<Either<K, Status>>
pub async fn list(&self, lp: &ListParams) -> Result<ObjectList<K>>
[src]
pub async fn delete_collection(
&self,
lp: &ListParams
) -> Result<Either<ObjectList<K>, Status>>
[src]
&self,
lp: &ListParams
) -> Result<Either<ObjectList<K>, Status>>
pub async fn patch(
&self,
name: &str,
pp: &PatchParams,
patch: Vec<u8>
) -> Result<K>
[src]
&self,
name: &str,
pp: &PatchParams,
patch: Vec<u8>
) -> Result<K>
pub async fn replace(&self, name: &str, pp: &PostParams, data: &K) -> Result<K> where
K: Serialize,
[src]
K: Serialize,
pub async fn watch(
&self,
lp: &ListParams,
version: &str
) -> Result<impl Stream<Item = WatchEvent<K>>>
[src]
&self,
lp: &ListParams,
version: &str
) -> Result<impl Stream<Item = WatchEvent<K>>>
impl<K> Api<K> where
K: Clone + DeserializeOwned,
[src]
impl<K> Api<K> where
K: Clone + DeserializeOwned,
[src]Scale subresource
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#scale-subresource
impl<K> Api<K> where
K: Clone + DeserializeOwned,
[src]
impl<K> Api<K> where
K: Clone + DeserializeOwned,
[src]Status subresource
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#status-subresource
pub async fn get_status(&self, name: &str) -> Result<K>
[src]
pub async fn patch_status(
&self,
name: &str,
pp: &PatchParams,
patch: Vec<u8>
) -> Result<K>
[src]
&self,
name: &str,
pp: &PatchParams,
patch: Vec<u8>
) -> Result<K>
pub async fn replace_status(
&self,
name: &str,
pp: &PostParams,
data: Vec<u8>
) -> Result<K>
[src]
&self,
name: &str,
pp: &PostParams,
data: Vec<u8>
) -> Result<K>
impl<K> Api<K> where
K: Clone + DeserializeOwned + LoggingObject,
[src]
impl<K> Api<K> where
K: Clone + DeserializeOwned + LoggingObject,
[src]Trait Implementations
Auto Trait Implementations
impl<K> !RefUnwindSafe for Api<K>
impl<K> Send for Api<K> where
K: Send,
K: Send,
impl<K> Sync for Api<K> where
K: Sync,
K: Sync,
impl<K> Unpin for Api<K> where
K: Unpin,
K: Unpin,
impl<K> !UnwindSafe for Api<K>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more