nomad-rs-api

Crates.ionomad-rs-api
lib.rsnomad-rs-api
version0.0.1-alpha.2
created_at2025-10-19 15:44:25.540875+00
updated_at2025-10-27 20:48:23.068149+00
descriptionProvides an ergonomic, type-safe interface for interacting with the HashiCorp Nomad API (https://developer.hashicorp.com/nomad)
homepage
repositoryhttps://github.com/rasorp/nomad-rs-api
max_upload_size
id1890561
size157,644
James Rasell (jrasell)

documentation

README

nomad-rs-api

The Nomad Rust API is an experimental project that provides an ergonomic, type-safe interface for interacting with the HashiCorp Nomad API using Rust.

⚠️ Status: This project is in an early experimental stage. Expect breaking changes, incomplete endpoints, and evolving design patterns as we iterate.

Usage

The client can be configured automatically using environment variabeles:

use nomad_rs_api::{Config, Nomad};

let client = Nomad::new(Config::from_env());

Alternatively, you can configure the client manually:

let config = Config {
    address: "http://localhost:4646".to_string(),
    token: None,
    ..Default::default()
};

let client = Nomad::new(config);

Query and Write Options

The query and write options can be easily built before making a request:

use nomad_rs_api::{option};

let query_opts = option::QueryOptions::new()
    .with_namespace("platform".to_string())
    .with_auth_token("auth_token".to_string());

let write_opts = option::WriteOptions::new()
    .with_namespace("platform".to_string())
    .with_auth_token("auth_token".to_string());
Commit count: 0

cargo fmt