pub struct Request {
pub url_path: String,
}
Expand description
A Kubernetes request builder
Takes a base_path and supplies constructors for common operations
The extra operations all return http::Request
objects.
Fields§
§url_path: String
The path component of a url
Implementations§
source§impl Request
impl Request
Convenience methods found from API conventions
sourcepub fn list(&self, lp: &ListParams) -> Result<Request<Vec<u8>>, Error>
pub fn list(&self, lp: &ListParams) -> Result<Request<Vec<u8>>, Error>
List a collection of a resource
sourcepub fn watch(
&self,
wp: &WatchParams,
ver: &str,
) -> Result<Request<Vec<u8>>, Error>
pub fn watch( &self, wp: &WatchParams, ver: &str, ) -> Result<Request<Vec<u8>>, Error>
Watch a resource at a given version
sourcepub fn get(&self, name: &str, gp: &GetParams) -> Result<Request<Vec<u8>>, Error>
pub fn get(&self, name: &str, gp: &GetParams) -> Result<Request<Vec<u8>>, Error>
Get a single instance
sourcepub fn create(
&self,
pp: &PostParams,
data: Vec<u8>,
) -> Result<Request<Vec<u8>>, Error>
pub fn create( &self, pp: &PostParams, data: Vec<u8>, ) -> Result<Request<Vec<u8>>, Error>
Create an instance of a resource
sourcepub fn delete(
&self,
name: &str,
dp: &DeleteParams,
) -> Result<Request<Vec<u8>>, Error>
pub fn delete( &self, name: &str, dp: &DeleteParams, ) -> Result<Request<Vec<u8>>, Error>
Delete an instance of a resource
sourcepub fn delete_collection(
&self,
dp: &DeleteParams,
lp: &ListParams,
) -> Result<Request<Vec<u8>>, Error>
pub fn delete_collection( &self, dp: &DeleteParams, lp: &ListParams, ) -> Result<Request<Vec<u8>>, Error>
Delete a collection of a resource
source§impl Request
impl Request
Subresources
sourcepub fn get_subresource(
&self,
subresource_name: &str,
name: &str,
) -> Result<Request<Vec<u8>>, Error>
pub fn get_subresource( &self, subresource_name: &str, name: &str, ) -> Result<Request<Vec<u8>>, Error>
Get an instance of the subresource
sourcepub fn create_subresource(
&self,
subresource_name: &str,
name: &str,
pp: &PostParams,
data: Vec<u8>,
) -> Result<Request<Vec<u8>>, Error>
pub fn create_subresource( &self, subresource_name: &str, name: &str, pp: &PostParams, data: Vec<u8>, ) -> Result<Request<Vec<u8>>, Error>
Create an instance of the subresource
source§impl Request
impl Request
Metadata-only request implementations
Requests set an extended Accept header compromised of JSON media type and additional parameters that retrieve only necessary metadata from an object.
sourcepub fn get_metadata(
&self,
name: &str,
gp: &GetParams,
) -> Result<Request<Vec<u8>>, Error>
pub fn get_metadata( &self, name: &str, gp: &GetParams, ) -> Result<Request<Vec<u8>>, Error>
Get a single metadata instance for a named resource
sourcepub fn list_metadata(&self, lp: &ListParams) -> Result<Request<Vec<u8>>, Error>
pub fn list_metadata(&self, lp: &ListParams) -> Result<Request<Vec<u8>>, Error>
List a collection of metadata of a resource
sourcepub fn watch_metadata(
&self,
wp: &WatchParams,
ver: &str,
) -> Result<Request<Vec<u8>>, Error>
pub fn watch_metadata( &self, wp: &WatchParams, ver: &str, ) -> Result<Request<Vec<u8>>, Error>
Watch metadata of a resource at a given version
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)