pub struct OpsRouterBuilder { /* private fields */ }Expand description
Builds the /_ops monitoring router.
Implementations§
Source§impl OpsRouterBuilder
impl OpsRouterBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Start an empty builder. Self::build returns
OpsBuilderError::MissingAuthenticator until
Self::with_authenticator or Self::with_dev_auth is called.
Sourcepub fn with_authenticator(self, auth: Arc<dyn Authenticator>) -> Self
pub fn with_authenticator(self, auth: Arc<dyn Authenticator>) -> Self
Required — Self::build returns Err if not called.
Sourcepub fn with_dev_auth(self) -> Self
pub fn with_dev_auth(self) -> Self
Capability-shaped default for laptop-dev — wires
klieo_auth_common::AllowAnonymous so every request reaches
the /_ops router without credentials.
TEST FIXTURE / DEMO ONLY. Gated behind the dev-auth
feature (CWE-1188); production builds without that feature
cannot reach AllowAnonymous and fail to compile rather than
silently accepting any caller. Pair with a non-production
network boundary (loopback bind, dev container) — never expose
a dev-auth /_ops to a multi-tenant network.
Sourcepub fn with_run_log_store(self, store: Arc<dyn RunLogStore>) -> Self
pub fn with_run_log_store(self, store: Arc<dyn RunLogStore>) -> Self
Enables GET /runs, GET /runs/{id}, GET /agents.
Sourcepub fn with_task_store(self, store: Arc<A2aTaskStore>) -> Self
pub fn with_task_store(self, store: Arc<A2aTaskStore>) -> Self
Enables GET /tasks.
Sourcepub fn with_resume_buffer(self, buf: Arc<KvResumeBuffer>) -> Self
pub fn with_resume_buffer(self, buf: Arc<KvResumeBuffer>) -> Self
Enables GET /streams.
Sourcepub fn build(self) -> Result<Router, OpsBuilderError>
pub fn build(self) -> Result<Router, OpsBuilderError>
§Errors
Returns OpsBuilderError::MissingAuthenticator if
Self::with_authenticator was not called before build.