Nomad HTTP API Client
HTTP API Version : v1.4.x
cargo add nomad-client-rs
Cargo.toml
:toml
[dependencies]
nomad-client-rs = "x.x.x"
| Class | Method | HTTP Request |
|------------|----------------------------|-------------------------------------------------|
| client | clientlistfiles | GET /client/fs/ls/{allocid} |
| client | clientgetfile | GET /client/fs/cat/{allocid}?path={filepath} |
| client | clientgetfileinfo | GET /client/fs/stat/{allocid}?path={filepath} |
| deployment | deploymentlist | GET /deployments |
| deployment | deploymentget | GET /deployments/{id} |
| deployment | deploymentallocationlist | GET /deployment/allocations/{id} |
| deployment | deploymentfail | POST /deployment/fail/{id} |
| event | eventssubscribe | GET /event/stream |
| job | jobdispatch | POST /job/{jobname}/dispatch |
| job | jobparse | POST /job/parse |
| namespace | namespacelist | GET /namespaces |
| namespace | namespaceget | GET /namespace/{namespace} |
| namespace | namespacecreate | POST /namespace |
| namespace | namespacedelete | DELETE /namespace/{namespace} |
| status | statusgetpeers | GET /status/peers |
| status | statusget_leader | GET /status/leader |
NomadClient can be configured by env variables.
If no variables are available it will use specified default.
| Variable | Default | |-------------------|------------------| | NOMADBASEURL | http://localhost | | NOMADPORT | 4646 | | NOMADAPI_VERSION | v1 |