Crates.io | nomad-client |
lib.rs | nomad-client |
version | 0.0.10 |
source | src |
created_at | 2021-04-03 04:19:00.571928 |
updated_at | 2023-02-12 05:14:05.437117 |
description | [Deprecated] A Rust client for HashiCorp Nomad's API. |
homepage | https://github.com/rivet-gg/Nomad.OAS/tree/master/clients/rust |
repository | https://github.com/rivet-gg/Nomad.OAS |
max_upload_size | |
id | 378015 |
size | 631,826 |
Nomad OpenApi specification
This API client was generated by the OpenAPI Generator project.
Put the package under your project folder and add the following to Cargo.toml
under [dependencies]
:
nomad-client = "0.0.10"
All URIs are relative to http://localhost:4646/v1
Class | Method | HTTP request | Description |
---|
AgentApi | force_leave | post /agent/force-leave | Forces a member of the gossip pool from the "failed" state into the "left" state. AgentApi | get_health | get /agent/health | Performs a basic healthcheck AgentApi | get_members | get /agent/members | Queries for the known peers in the gossip pool AgentApi | get_self | get /agent/self | Queries for information about the agent we are connected to AgentApi | get_servers | get /agent/servers | Queries an agent in client mode for its list of known servers AgentApi | join | post /agent/join | Causes the agent to join a cluster by joining the gossip pool at one of the given addresses AgentApi | stream_logs | get /agent/monitor | Streams logs from a specific Nomad server node AgentApi | update_servers | post /agent/servers | Updates the list of known servers to the given addresses, replacing all previous addresses AllocationsApi | get_allocation | get /allocation/{alloc_id} | reads information about a specific allocation AllocationsApi | get_allocations | get /allocations | query for and interact with allocations AllocationsApi | restart_allocation | post /allocation/{alloc_id}/restart | restarts an allocation or task in-place AllocationsApi | signal_allocation | post /allocation/{alloc_id}/signal | sends a signal to an allocation or task AllocationsApi | stop_allocation | post /allocation/{alloc_id}/stop | stops and reschedules a specific allocation ClientApi | garbage_collect_allocation | get /client/allocation/{alloc_id}/gc | forces a garbage collection of a particular, stopped allocation on a node ClientApi | garbage_collect_allocation_0 | get /client/gc | forces a garbage collection of all stopped allocations on a node ClientApi | get_client_allocation_stats | get /client/allocation/{alloc_id}/stats | query the actual resources consumed by an allocation ClientApi | get_client_file | get /client/fs/cat/{alloc_id} | reads the contents of a file in an allocation directory ClientApi | get_client_file_at_offest | get /client/fs/readat/{alloc_id} | reads the contents of a file in an allocation directory at a particular offset and limit ClientApi | get_client_stats | get /client/stats | queries the actual resources consumed on a node. The API endpoint is hosted by the Nomad client and requests have to be made to the nomad client whose resource usage metrics are of interest ClientApi | list_client_files | get /client/fs/ls/{alloc_id} | lists files in an allocation directory ClientApi | stat_client_file | get /client/fs/stat/{alloc_id} | stats a file in an allocation ClientApi | stream_client_file | get /client/fs/stream/{alloc_id} | streams the contents of a file in an allocation directory ClientApi | stream_client_logs | get /client/fs/logs/{alloc_id} | streams a task's stderr/stdout logs DeploymentsApi | fail_deployment | post /deployment/fail/{deployment_id} | mark a deployment as failed. This should be done to force the scheduler to stop creating allocations as part of the deployment or to cause a rollback to a previous job version. This endpoint only triggers a rollback if the most recent stable version of the job has a different specification than the job being reverted DeploymentsApi | get_allocations_for_deployment | get /deployment/allocations/{deployment_id} | lists the allocations created or modified for the given deployment DeploymentsApi | get_deployment | get /deployment/{deployment_id} | reads information about a specific deployment by ID DeploymentsApi | get_deployments | get /deployments | lists all deployments DeploymentsApi | pause_deployment | post /deployment/pause/{deployment_id} | pause or unpause a deployment. This is done to pause a rolling upgrade or resume it DeploymentsApi | promote_deployment | post /deployment/promote/{deployment_id} | promote task groups that have canaries for a deployment. This should be done when the placed canaries are healthy and the rolling upgrade of the remaining allocations should begin DeploymentsApi | set_allocation_health_in_deployment | post /deployment/allocation-health/{deployment_id} | set the health of an allocation that is in the deployment manually EvaluationsApi | get_allocations_for_evaluation | get /evaluation/{eval_id}/allocations | lists the allocations created or modified for the given evaluation EvaluationsApi | get_evaluation | get /evaluation/{eval_id} | reads information about a specific evaluation by ID EvaluationsApi | get_evaluations | get /evaluations | lists all evaluations JobsApi | dispatch_job | post /job/{job_id}/dispatch | dispatches a new instance of a parameterized job JobsApi | evaluate_job | post /job/{job_id}/evaluate | creates a new evaluation for the given job. This can be used to force run the scheduling logic if necessary JobsApi | force_new_periodic_instance | post /job/{job_id}/periodic/force | forces a new instance of the periodic job. A new instance will be created even if it violates the job's prohibit_overlap settings. As such, this should be only used to immediately run a periodic job JobsApi | get_job | get /job/{job_id} | reads information about a single job for its specification and status JobsApi | get_job_allocations | get /job/{job_id}/allocations | reads information about a single job's allocations JobsApi | get_job_deployments | get /job/{job_id}/deployments | lists a single job's deployments JobsApi | get_job_evaluations | get /job/{job_id}/evaluations | reads information about a single job's evaluations JobsApi | get_job_latest_deployment | get /job/{job_id}/deployment | get a single job's most recent deployment JobsApi | get_job_scale_status | get /job/{job_id}/scale | reads scale information about a job JobsApi | get_job_summary | get /job/{job_id}/summary | reads summary information about a job JobsApi | get_job_versions | get /job/{job_id}/versions | reads information about all versions of a job JobsApi | get_jobs | get /jobs | lists all known jobs in the system registered with Nomad JobsApi | parse_job_hcl | post /jobs/parse | parse a HCL jobspec and produce the equivalent JSON encoded job JobsApi | plan_job | post /job/{job_id}/plan | invokes a dry-run of the scheduler for the job JobsApi | register_job | post /jobs | creates (aka "registers") a new job in the system JobsApi | revert_job | post /job/{job_id}/revert | reverts the job to an older version JobsApi | scale_task_group | post /job/{job_id}/scale | performs a scaling action against a job. Currently, this endpoint supports scaling the count for a task group JobsApi | set_job_stability | post /job/{job_id}/stable | sets the job's stability JobsApi | stop_job | delete /job/{job_id} | deregisters a job, and stops all allocations part of it JobsApi | update_job | post /job/{job_id} | registers a new job or updates an existing job JobsApi | validate_job | post /validate/job | validate object structs, fields, and types NodesApi | evaluate_node | post /node/{node_id}/evaluate | creates a new evaluation for the given node. This can be used to force a run of the scheduling logic NodesApi | get_allocations_for_node | get /node/{node_id}/allocations | lists all of the allocations for the given node NodesApi | get_node | get /node/{node_id} | queries the status of a client node NodesApi | get_nodes | get /nodes | lists all nodes registered with Nomad NodesApi | search | post /search | returns matches for a given prefix and context, where a context can be jobs, allocations, evaluations, nodes, or deployments NodesApi | update_drain_mode_for_node | post /node/{node_id}/drain | toggles the drain mode of the node NodesApi | update_node_eligibility | post /node/{node_id}/eligibility | toggles the scheduling eligibility of the node RegionsApi | get_regions | get /regions | list all known regions StatusApi | get_leader | get /status/leader | returns the address of the current leader in the region StatusApi | get_peers | get /status/peers | returns the set of raft peers in the region SystemApi | force_gc | put /system/gc | initializes a garbage collection of jobs, evaluations, allocations, and nodes. This is an asynchronous operation SystemApi | reconcile_summary | put /system/reconcile/summaries | reconciles the summaries of all registered jobs VolumesApi | deregister_volume | delete /volume/csi/{volume_id} | deregisters an external volume with Nomad. It is an error to deregister a volume that is in use VolumesApi | get_volume | get /volume/csi/{volume_id} | reads information about a specific volume VolumesApi | get_volumes | get /volumes | lists all volumes VolumesApi | register_volume | put /volume/csi/{volume_id} | registers an external volume with Nomad. It is an error to register an existing volume