pub struct WorkerConfig {
pub backend: BackendConfig,
pub worker_id: WorkerId,
pub worker_instance_id: WorkerInstanceId,
pub namespace: Namespace,
pub lanes: Vec<LaneId>,
pub capabilities: Vec<String>,
pub lease_ttl_ms: u64,
pub claim_poll_interval_ms: u64,
pub max_concurrent_tasks: usize,
}Expand description
Configuration for a FlowFabric worker.
RFC-012 Stage 1c tranche 1. Valkey-specific connection
parameters (host, port, tls, cluster) moved to the nested
BackendConfig field, which also carries
BackendTimeouts and
BackendRetry policy. Build one
with BackendConfig::valkey for the common standalone case; for
TLS / cluster / tuned retry, construct the
ValkeyConnection and
BackendConfig fields directly.
Worker-policy fields (lease_ttl_ms, claim_poll_interval_ms,
capability set, lane list, identity) stay on WorkerConfig —
those are orthogonal to the storage backend choice.
WorkerConfig::new was removed in this stage (pre-1.0 clean
break); construct via struct literal.
Fields§
§backend: BackendConfigBackend connection + shared timeouts / retry policy.
worker_id: WorkerIdLogical worker identity (e.g., “gpu-worker-pool-1”).
worker_instance_id: WorkerInstanceIdConcrete worker process/runtime instance identity (e.g., container ID).
namespace: NamespaceNamespace this worker operates in.
lanes: Vec<LaneId>Lanes this worker claims work from.
capabilities: Vec<String>Capabilities this worker advertises for routing.
lease_ttl_ms: u64Lease TTL in milliseconds. Default: 30,000 (30s).
claim_poll_interval_ms: u64Interval between claim attempts when idle, in milliseconds. Default: 1,000 (1s).
max_concurrent_tasks: usizeMaximum concurrent tasks. Default: 1.
Implementations§
Source§impl WorkerConfig
impl WorkerConfig
Sourcepub fn renewal_interval_ms(&self) -> u64
pub fn renewal_interval_ms(&self) -> u64
Lease renewal interval: TTL / 3 (renew at 1/3 of TTL, leaving 2/3 margin).
Auto Trait Implementations§
impl Freeze for WorkerConfig
impl RefUnwindSafe for WorkerConfig
impl Send for WorkerConfig
impl Sync for WorkerConfig
impl Unpin for WorkerConfig
impl UnsafeUnpin for WorkerConfig
impl UnwindSafe for WorkerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more