pub struct Endpoint<'a> { /* private fields */ }Implementations§
Source§impl<'a> Endpoint<'a>
impl<'a> Endpoint<'a>
Sourcepub fn new(client: &'a Nomad) -> Self
pub fn new(client: &'a Nomad) -> Self
Create a new Endpoint with the given Nomad client to interact with
the deployment endpoints.
Sourcepub async fn fail(
&self,
id: &str,
opts: Option<WriteOptions>,
) -> Result<DeploymentUpdateResponse, ClientError>
pub async fn fail( &self, id: &str, opts: Option<WriteOptions>, ) -> Result<DeploymentUpdateResponse, ClientError>
Sourcepub async fn get(
&self,
id: &str,
opts: Option<QueryOptions>,
) -> Result<Deployment, ClientError>
pub async fn get( &self, id: &str, opts: Option<QueryOptions>, ) -> Result<Deployment, ClientError>
Sourcepub async fn list(
&self,
opts: Option<QueryOptions>,
) -> Result<Vec<Deployment>, ClientError>
pub async fn list( &self, opts: Option<QueryOptions>, ) -> Result<Vec<Deployment>, ClientError>
Sourcepub async fn promote(
&self,
deployment_promote_request: DeploymentPromoteRequest,
opts: Option<WriteOptions>,
) -> Result<DeploymentUpdateResponse, ClientError>
pub async fn promote( &self, deployment_promote_request: DeploymentPromoteRequest, opts: Option<WriteOptions>, ) -> Result<DeploymentUpdateResponse, ClientError>
Promote a deployment to the next stage.
§Arguments
deployment_promote_request- The request containing the deployment ID, all flag, and optional groups to promote.opts- Optional write options for the request.
§Returns
A Result containing the deployment update response or an error if the
request fails.
Sourcepub async fn set_pause(
&self,
deployment_pause_request: DeploymentPauseRequest,
opts: Option<WriteOptions>,
) -> Result<DeploymentUpdateResponse, ClientError>
pub async fn set_pause( &self, deployment_pause_request: DeploymentPauseRequest, opts: Option<WriteOptions>, ) -> Result<DeploymentUpdateResponse, ClientError>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Endpoint<'a>
impl<'a> !UnwindSafe for Endpoint<'a>
impl<'a> Freeze for Endpoint<'a>
impl<'a> Send for Endpoint<'a>
impl<'a> Sync for Endpoint<'a>
impl<'a> Unpin for Endpoint<'a>
impl<'a> UnsafeUnpin for Endpoint<'a>
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