pub struct Config {
pub server: ServerConfig,
pub auth: AuthConfig,
pub store: StoreConfig,
pub limits: LimitsConfig,
pub pools: Vec<PoolSection>,
pub resources: Vec<ResourceSection>,
pub outputs: OutputsConfig,
pub shards: Vec<ShardSection>,
}Expand description
Top-level server configuration.
Fields§
§server: ServerConfigListeners, TLS and shutdown behaviour.
auth: AuthConfigBearer tokens and client-certificate role mappings.
store: StoreConfigWhere scheduler state is kept.
limits: LimitsConfigRequest and resource limits.
pools: Vec<PoolSection>Worker pools (each served by remote workers).
resources: Vec<ResourceSection>Shared resources (semaphores and token buckets).
outputs: OutputsConfigIn-memory cache of recent task outputs.
shards: Vec<ShardSection>Groups of pools served by separate leaders. Every shard’s servers read the same list
and pick their own with server.shard.
Implementations§
Source§impl Config
impl Config
Sourcepub fn read(path: &Path) -> Result<Config>
pub fn read(path: &Path) -> Result<Config>
Read a TOML file without validating it, to apply command-line overrides first; call
Config::validate afterwards (crate::run does).
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Check every option. Called by Config::parse and again by crate::run.
Sourcepub fn shard_plan(&self) -> Option<ShardPlan>
pub fn shard_plan(&self) -> Option<ShardPlan>
This server’s shard and the full shard list, if the configuration has shards.
Sourcepub fn for_own_shard(&self) -> Config
pub fn for_own_shard(&self) -> Config
The configuration this server runs: only its shard’s pools, and the store namespace
({shard} in the schema or path) filled in. Unchanged without shards.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request