pub struct NodeConfig {Show 27 fields
pub node_id: String,
pub endpoint: String,
pub intent: String,
pub model: Option<String>,
pub backend: Option<String>,
pub region: Option<String>,
pub capabilities: Vec<String>,
pub directory_url: String,
pub timeout_ms: u64,
pub max_concurrent: usize,
pub tokens_per_min: u32,
pub max_tokens: u32,
pub transport_endpoint: Option<String>,
pub transport_method: Option<String>,
pub nat_type: Option<String>,
pub transport_metadata: Option<Value>,
pub exposure_mode: Option<String>,
pub cip_policy: Option<Arc<CooperativeInferencePolicy>>,
pub pricing: Option<PricingConfig>,
pub node_hmac_key: String,
pub availability_windows: Vec<Window>,
pub enable_idempotency: bool,
pub enable_mesh: bool,
pub relay_capable: bool,
pub relay_accept_port: u16,
pub relay_worker_endpoint: Option<String>,
pub log_dir: Option<PathBuf>,
}Expand description
Configuration for an IICP provider node.
Fields§
§node_id: String§endpoint: String§intent: String§model: Option<String>§backend: Option<String>Detected backend server flavor advertised at register (node-detail field):
ollama / lmstudio / vllm / llamacpp / anthropic / custom.
region: Option<String>§capabilities: Vec<String>§directory_url: String§timeout_ms: u64§max_concurrent: usizeMaximum concurrent tasks; excess requests receive 429 IICP-E021.
tokens_per_min: u32Tokens-per-minute capacity declared to directory (limits.tokens_per_min).
max_tokens: u32Per-request token cap declared on the capability object (capabilities[].max_tokens).
transport_endpoint: Option<String>Optional native IICP binary endpoint (spec/iicp-dir.md v0.7.0).
Scheme MUST be iicp:// (plaintext) or iicpsec:// (TLS).
Default IICP port is 9484 (ADR-040). When set, the directory persists it
and clients SHOULD prefer it over endpoint for task CALLs.
transport_method: Option<String>#331 Phase A.1 / ADR-041 — NAT-traversal observability fields surfaced
to the directory in the register payload. Populated by
IicpNode::apply_nat_profile when an operator runs detect_nat at
startup, OR set manually if the operator already knows their topology.
transport_method is one of direct / upnp_mapped / stun_hole_punch
/ turn_relay / external_tunnel / unknown.
nat_type: Option<String>One of full_cone / restricted_cone / port_restricted / symmetric
/ unknown (observability only).
transport_metadata: Option<Value>Forward-compat slot for ADR-041 transport_candidates[] + relay_endpoint.
exposure_mode: Option<String>ADR-043 §9 — 8-category exposure_mode, computed by qualify_service and set
in apply_nat_profile. Surfaced to the directory nodes.exposure_mode column (#344).
cip_policy: Option<Arc<CooperativeInferencePolicy>>S.12 §2.1 CIP policy block surfaced to the directory register payload.
When None, register() falls back to the module-level
crate::cip_policy::get_cip_policy — operators can configure once
and have it apply to all nodes that don’t override.
pricing: Option<PricingConfig>ADR-019 declarative pricing block. When None, the SDK does not
advertise pricing and the directory defaults to a 1.0 multiplier.
node_hmac_key: StringOperator-provisioned HMAC key for ADR-019 pricing signatures. When empty, the SDK captures the directory-issued key from the register response and uses it for subsequent signing.
availability_windows: Vec<Window>Phase 3+ availability windows (ADR-006). Local-time “HH:MM” windows that
shape the effective capacity advertised to the directory and gated at
serve time. Empty → always full capacity. See crate::availability.
enable_idempotency: boolADR-010 task_id idempotency. false by default to preserve the pre-0.6
contract (a task_id may be resubmitted). When true, a duplicate task_id
within the 5-minute window is rejected with IICP-E010.
enable_mesh: boolPhase 2 mesh (ADR-009/022). When true, serve() gossips peers and exposes
POST /v1/peers. Default false.
relay_capable: boolWhen true, serve() exposes POST /v1/relay to forward tasks to peers learned
via gossip (ADR-022). Requires enable_mesh. Default false.
relay_accept_port: u16Port for the RelayAcceptServer (R1 relay-as-last-resort, #341). Workers behind CGNAT connect here outbound and send RELAY_BIND. Default 9485.
relay_worker_endpoint: Option<String>R2: when set, this node acts as a relay WORKER — connects outbound to the specified relay endpoint. Format: “host:port” (e.g. “relay.example.com:9485”).
log_dir: Option<PathBuf>Directory for persistent log files (<node_id>.log + events.jsonl).
None disables file logging (stderr only). Overridden by IICP_LOG_DIR.
Implementations§
Trait Implementations§
Source§impl Clone for NodeConfig
impl Clone for NodeConfig
Source§fn clone(&self) -> NodeConfig
fn clone(&self) -> NodeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more