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