constellation/worker_pool/types
Canonical public values for worker pools.
Types
Invalid worker pool settings.
pub type ConfigError {
InvalidSize(Int)
InvalidPrefetch(Int)
InvalidTimeout(Int)
InvalidBufferCapacity(Int)
}
Constructors
-
InvalidSize(Int) -
InvalidPrefetch(Int) -
InvalidTimeout(Int) -
InvalidBufferCapacity(Int)
Lifecycle and processing events emitted asynchronously by a pool.
pub type Event {
WorkerStarted(id: WorkerId, slot: Int)
WorkerStopped(id: WorkerId, slot: Int)
WorkerReplaced(
previous: WorkerId,
replacement: WorkerId,
slot: Int,
)
BatchStarted(id: WorkerId, event_count: Int)
BatchCompleted(id: WorkerId, event_count: Int)
PoolStopping
PoolStopped
}
Constructors
Runtime errors returned by pool operations.
pub type PoolError {
PoolUnavailable
PoolTimeout
AlreadyStopping
SourceManaged
StageProtocol(stage_error.StageError)
}
Constructors
-
PoolUnavailable -
PoolTimeout -
AlreadyStopping -
SourceManaged -
StageProtocol(stage_error.StageError)
Errors that can prevent a pool from starting.
pub type StartError {
InvalidConfig(ConfigError)
ActorStart(actor.StartError)
}
Constructors
-
InvalidConfig(ConfigError) -
ActorStart(actor.StartError)
Values
pub fn worker_id_to_int(id: WorkerId) -> Int