pub struct NomadClient { /* private fields */ }
Implementations§
Source§impl NomadClient
impl NomadClient
pub async fn acl_tokens_list( &self, params: &AclTokensListParams, ) -> Result<Vec<AclToken>, ClientError>
pub async fn acl_token_create( &self, req: &AclTokenCreateRequest, ) -> Result<AclToken, ClientError>
pub async fn acl_token_update( &self, accessor_id: String, req: &AclTokenUpdateRequest, ) -> Result<AclToken, ClientError>
pub async fn acl_token_read( &self, accessor_id: String, ) -> Result<AclToken, ClientError>
pub async fn acl_token_read_self(&self) -> Result<AclToken, ClientError>
pub async fn acl_token_delete( &self, accessor_id: String, ) -> Result<(), ClientError>
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>
pub async fn client_read_metadata( &self, params: &ClientReadMetadataParams, ) -> Result<ClientMetadataResponse, ClientError>
pub async fn client_update_metadata( &self, req: &ClientUpdateMetadataRequest, ) -> Result<ClientMetadataResponse, 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, params: &EventsSubscribeParams, ) -> (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: &JobsParseRequest, ) -> 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>
pub async fn job_stop( &self, job_name: &str, params: &JobStopParams, ) -> Result<JobStopResponse, 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 service_get( &self, service_name: &str, params: &ServiceParams, ) -> Result<Vec<ServiceRegistration>, ClientError>
pub async fn service_list( &self, params: &ServiceParams, ) -> Result<Vec<NamespacedService>, 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<(), ClientError>
Source§impl NomadClient
impl NomadClient
pub fn new(config: Config) -> Self
pub fn config(&self) -> &Config
pub fn config_mut(&mut self) -> &mut Config
pub fn get_base_url(&self) -> String
pub fn get_endpoint(&self, endpoint: &str) -> String
pub fn request(&self, method: Method, endpoint: &str) -> RequestBuilder
Trait Implementations§
Source§impl Clone for NomadClient
impl Clone for NomadClient
Source§fn clone(&self) -> NomadClient
fn clone(&self) -> NomadClient
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NomadClient
impl Debug for NomadClient
Auto Trait Implementations§
impl Freeze for NomadClient
impl !RefUnwindSafe for NomadClient
impl Send for NomadClient
impl Sync for NomadClient
impl Unpin for NomadClient
impl !UnwindSafe for NomadClient
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