pub struct Config {
pub database: DatabaseConfig,
pub api_web: ApiWebConfig,
pub storage: StorageConfig,
pub auth: AuthConfig,
pub moltbook: MoltbookConfig,
pub worker: WorkerConfig,
pub quotas: QuotaConfig,
pub github_app: GithubAppConfig,
pub runner: RunnerConfig,
pub logging: LoggingConfig,
}Expand description
Application configuration loaded from validated AGENTICS_* environment values.
Fields§
§database: DatabaseConfig§api_web: ApiWebConfig§storage: StorageConfig§auth: AuthConfig§moltbook: MoltbookConfig§worker: WorkerConfig§quotas: QuotaConfig§github_app: GithubAppConfig§runner: RunnerConfig§logging: LoggingConfigImplementations§
Source§impl Config
impl Config
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Load configuration from AGENTICS_* environment variables with defaults.
Sourcepub fn validate_api_security(&self) -> Result<()>
pub fn validate_api_security(&self) -> Result<()>
Reject settings that are acceptable for local development but dangerous when the API is reachable from another machine.
Sourcepub fn validate_object_storage_config(&self) -> Result<()>
pub fn validate_object_storage_config(&self) -> Result<()>
Validate durable object storage configuration.
Sourcepub fn storage_factory_options(&self) -> Result<StorageFactoryOptions>
pub fn storage_factory_options(&self) -> Result<StorageFactoryOptions>
Build backend-specific durable storage options from validated runtime config.
Sourcepub fn storage_work_root(&self) -> Result<PathBuf>
pub fn storage_work_root(&self) -> Result<PathBuf>
Resolve the host-local work root for storage staging and materialization.
Sourcepub fn validate_runner_storage(&self) -> Result<()>
pub fn validate_runner_storage(&self) -> Result<()>
Validate worker-only storage settings before claiming evaluation jobs.
Sourcepub fn worker_gpu_probe_image(&self) -> Result<&str>
pub fn worker_gpu_probe_image(&self) -> Result<&str>
Return the validated GPU probe image for GPU-capable workers.
Sourcepub fn requires_digest_pinned_images(&self) -> bool
pub fn requires_digest_pinned_images(&self) -> bool
Return whether this configuration must enforce immutable hosted images.
Sourcepub fn runner_writable_storage_mode(&self) -> RunnerWritableStorageMode
pub fn runner_writable_storage_mode(&self) -> RunnerWritableStorageMode
Handles runner writable storage mode for this module.
Sourcepub fn runner_runtime_root(&self) -> Result<PathBuf>
pub fn runner_runtime_root(&self) -> Result<PathBuf>
Return the host-visible root for transient runner artifacts.
Sourcepub fn agent_registration_mode(&self) -> AgentRegistrationMode
pub fn agent_registration_mode(&self) -> AgentRegistrationMode
Return the configured agent-registration mode.
Sourcepub fn allows_local_registration_testing_knobs(&self) -> bool
pub fn allows_local_registration_testing_knobs(&self) -> bool
Return whether local-only testing knobs such as unlimited pioneer codes may be used.
Sourcepub fn runner_writable_slot_classes_mb(&self) -> Result<Vec<u64>>
pub fn runner_writable_slot_classes_mb(&self) -> Result<Vec<u64>>
Handles runner writable slot classes mb for this module.
Sourcepub fn cors_allowed_origin_values(&self) -> Vec<String>
pub fn cors_allowed_origin_values(&self) -> Vec<String>
Split the comma-separated CORS allowlist into trimmed origin strings.
Sourcepub fn github_app_enabled(&self) -> bool
pub fn github_app_enabled(&self) -> bool
Return whether GitHub sign-in is fully configured for creator login.
Trait Implementations§
Source§impl Validate for Config
impl Validate for Config
Source§fn validate_into(
&self,
__garde_user_ctx: &Self::Context,
__garde_path: &mut dyn FnMut() -> Path,
__garde_report: &mut Report,
)
fn validate_into( &self, __garde_user_ctx: &Self::Context, __garde_path: &mut dyn FnMut() -> Path, __garde_report: &mut Report, )
Self, aggregating all validation errors into Report.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,
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