pub struct EngineState<S: WorkflowStore> {
pub workflow: Arc<WorkflowCtx<S>>,
pub dashboard: Arc<DashboardCtx>,
pub auth: Option<AuthCtx>,
pub vault: Option<VaultCtx>,
pub admin_api_keys: Arc<Vec<String>>,
pub modules: Arc<Vec<String>>,
pub instance_id: Uuid,
pub engine_version: &'static str,
pub started_at: f64,
pub engine_config: Arc<EngineConfig>,
}Fields§
§workflow: Arc<WorkflowCtx<S>>§dashboard: Arc<DashboardCtx>§auth: Option<AuthCtx>Composed auth context — present iff the runtime
engine.modules.auth.enabled row is TRUE. axum::FromRef
extracts it for the auth router’s handlers.
vault: Option<VaultCtx>Composed vault context — present iff the vault Cargo feature
is on AND the runtime engine.modules.vault.enabled row is
TRUE. Plan 17’s v0.3.0 module — KV / transit / collections /
share / sealing / dynamic creds / BW-compat all hang off this.
admin_api_keys: Arc<Vec<String>>Admin API keys for the /admin/* HTTP surface — checked by
auth handlers via axum::extract::FromRef<EngineState<S>> so
the same value flows from engine.toml through to per-request
auth gating without a global static. Empty when no admin
surface is configured.
modules: Arc<Vec<String>>Names of modules attached/loaded during boot — surfaced through
/healthz for ops visibility (which functional modules this
engine instance has wired up).
instance_id: UuidThis instance’s row in engine.instances. Lets /healthz and
future visibility endpoints identify which engine process is
answering.
engine_version: &'static strassay-engine crate version. Returned in
/api/v1/engine/core/health so external monitors can correlate
health checks with deployments.
started_at: f64Wall-clock seconds since the UNIX epoch when this engine process
finished booting. Surfaced through /api/v1/engine/core/info so the
engine console can display “uptime” without an extra DB lookup
per request — matches the value the engine wrote to its
engine.instances row at boot.
engine_config: Arc<EngineConfig>Parsed engine.toml snapshot — admin endpoints serialise this
(with secrets redacted) so the engine console’s “Config” pane
shows the operator exactly what the running engine is using.
Arc so cloning state per-request stays cheap.
Trait Implementations§
Source§impl<S: Clone + WorkflowStore> Clone for EngineState<S>
impl<S: Clone + WorkflowStore> Clone for EngineState<S>
Source§fn clone(&self) -> EngineState<S>
fn clone(&self) -> EngineState<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<S: WorkflowStore> FromRef<EngineState<S>> for AuthCtx
impl<S: WorkflowStore> FromRef<EngineState<S>> for AuthCtx
Source§fn from_ref(s: &EngineState<S>) -> Self
fn from_ref(s: &EngineState<S>) -> Self
FromRef impl so auth handlers can extract the resolved AuthCtx
via State<AuthCtx>. Panics when the engine binary mounted the
auth router without composing an AuthCtx — a misconfiguration
the engine boot path is responsible for preventing (the auth
router is only mounted when state.auth.is_some()).
Source§impl<S: WorkflowStore> FromRef<EngineState<S>> for AdminApiKeys
impl<S: WorkflowStore> FromRef<EngineState<S>> for AdminApiKeys
Source§fn from_ref(s: &EngineState<S>) -> Self
fn from_ref(s: &EngineState<S>) -> Self
Source§impl<S: WorkflowStore> FromRef<EngineState<S>> for VaultCtx
Available on crate feature vault only.
impl<S: WorkflowStore> FromRef<EngineState<S>> for VaultCtx
vault only.Source§fn from_ref(s: &EngineState<S>) -> Self
fn from_ref(s: &EngineState<S>) -> Self
FromRef impl so vault handlers (added Phase 1+) can extract the
resolved VaultCtx via State<VaultCtx>. Panics when the vault
router is mounted without composing a VaultCtx — same engine-
boot-bug surface AuthCtx uses.
Auto Trait Implementations§
impl<S> !RefUnwindSafe for EngineState<S>
impl<S> !UnwindSafe for EngineState<S>
impl<S> Freeze for EngineState<S>
impl<S> Send for EngineState<S>
impl<S> Sync for EngineState<S>
impl<S> Unpin for EngineState<S>
impl<S> UnsafeUnpin for EngineState<S>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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