Struct nomad_client_rs::NomadClient
source · pub struct NomadClient { /* private fields */ }Implementations§
source§impl NomadClient
impl NomadClient
pub async fn allocation_restart( &self, alloc_id: &str, req: &AllocationRestartRequest ) -> Result<(), ClientError>
source§impl NomadClient
impl NomadClient
pub async fn client_list_files( &self, alloc_id: &str, path: Option<String> ) -> Result<Vec<AllocFileInfo>, ClientError>
pub async fn client_get_file( &self, alloc_id: &str, file_path: &str ) -> Result<String, ClientError>
pub async fn client_get_file_info( &self, alloc_id: &str, file_path: &str ) -> Result<AllocFileInfo, ClientError>
source§impl NomadClient
impl NomadClient
pub async fn deployment_list( &self, params: Option<DeploymentListParams> ) -> Result<Vec<Deployment>, ClientError>
pub async fn deployment_get(&self, id: &str) -> Result<Deployment, ClientError>
pub async fn deployment_allocation_list( &self, id: &str ) -> Result<Vec<Allocation>, ClientError>
pub async fn deployment_fail( &self, id: &str ) -> Result<DeploymentFailResponse, ClientError>
source§impl NomadClient
impl NomadClient
pub fn events_subscribe( &self ) -> (JoinHandle<Result<(), ClientError>>, UnboundedReceiver<Event>)
source§impl NomadClient
impl NomadClient
pub async fn job_dispatch( &self, job_name: &str, req: &JobDispatchRequest ) -> Result<JobDispatchResponse, ClientError>
pub async fn job_parse(&self, req: &JobParseRequest) -> Result<Job, ClientError>
pub async fn job_create( &self, req: &JobCreateRequest ) -> Result<JobCreateResponse, ClientError>
pub async fn job_list_allocations( &self, job_name: &str, params: &JobListAllocationsParams ) -> Result<Vec<Allocation>, ClientError>
source§impl NomadClient
impl NomadClient
pub async fn namespace_list( &self, params: Option<NamespaceListParams> ) -> Result<Vec<Namespace>, ClientError>
pub async fn namespace_get( &self, namespace: &str ) -> Result<Namespace, ClientError>
pub async fn namespace_create( &self, namespace: &NamespaceRequest ) -> Result<(), ClientError>
pub async fn namespace_delete(&self, namespace: &str) -> Result<(), ClientError>
source§impl NomadClient
impl NomadClient
pub async fn status_get_leader(&self) -> Result<String, ClientError>
pub async fn status_get_peers(&self) -> Result<Vec<String>, ClientError>
source§impl NomadClient
impl NomadClient
pub async fn variables_list( &self, params: &VariableListParams ) -> Result<Vec<Variable>, ClientError>
pub async fn variable_get( &self, var_path: &str, params: &VariableGetParams ) -> Result<Variable, ClientError>
pub async fn variable_create( &self, var_path: &str, req: &VariableCreateRequest ) -> Result<Variable, ClientError>
pub async fn variable_delete( &self, var_path: &str, params: &VariableDeleteParams ) -> Result<VariableDeleteResponse, ClientError>
Trait Implementations§
source§impl Clone for NomadClient
impl Clone for NomadClient
source§fn clone(&self) -> NomadClient
fn clone(&self) -> NomadClient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more