pub struct WorkerSpec {Show 16 fields
pub url: String,
pub models: WorkerModels,
pub worker_type: WorkerType,
pub connection_mode: ConnectionMode,
pub runtime_type: RuntimeType,
pub provider: Option<ProviderType>,
pub labels: HashMap<String, String>,
pub priority: u32,
pub cost: f32,
pub api_key: Option<String>,
pub bootstrap_port: Option<u16>,
pub bootstrap_host: String,
pub kv_connector: Option<String>,
pub kv_role: Option<String>,
pub health: HealthCheckConfig,
pub max_connection_attempts: u32,
}Expand description
Core worker identity and configuration.
The single canonical representation of “what is a worker”. Used as the
shared sub-struct across API requests, API responses, and internal runtime
state via #[serde(flatten)].
Fields use #[serde(default)] so the same struct works for both input
(partial config from user) and output (fully resolved state).
Fields§
§url: StringWorker URL.
models: WorkerModelsModels this worker can serve.
worker_type: WorkerTypeWorker type: regular, prefill, or decode.
connection_mode: ConnectionModeConnection mode: http or grpc.
runtime_type: RuntimeTypeRuntime type: sglang, vllm, trtllm, or external.
provider: Option<ProviderType>External provider for API transformations.
None means native/passthrough.
labels: HashMap<String, String>Additional labels/tags.
priority: u32Worker priority (higher = preferred).
cost: f32Worker cost factor (baseline = 1.0).
api_key: Option<String>Worker API key. Accepted on input, never included in responses.
bootstrap_port: Option<u16>Bootstrap port for prefill workers in PD disaggregated mode.
bootstrap_host: StringBootstrap hostname (derived from URL at construction time).
kv_connector: Option<String>KV connector type (e.g. “MooncakeConnector”, “NixlConnector”).
kv_role: Option<String>KV role (e.g. “kv_producer”, “kv_consumer”, “kv_both”).
health: HealthCheckConfigHealth check configuration.
max_connection_attempts: u32Maximum connection attempts during worker registration (default: 20).
Implementations§
Trait Implementations§
Source§impl Clone for WorkerSpec
impl Clone for WorkerSpec
Source§fn clone(&self) -> WorkerSpec
fn clone(&self) -> WorkerSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more