Skip to main content

Service

Trait Service 

Source
pub trait Service:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn name(&self) -> &'static str { ... }
    fn init(
        &self,
        _ctx: &Arc<Context>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>> { ... }
    fn check(&self) -> bool { ... }
}

Provided Methods§

Source

fn name(&self) -> &'static str

Source

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source

fn check(&self) -> bool

Availability predicate for this service instance.

The kernel consumes check() at every point where a freshly built instance meets the graph:

  • crate::RegistryService::register — after the plugin factory produces the service and BEFORE it is provided; a false verdict rests the fiber as inspectable Failed { error: "availability predicate rejected service" } instead of Active. Registration is non-throwing: register-before-ready is a supported transient that later refreshes converge.
  • crate::Context::plugin — after init; a false verdict leaves the provided value in place but rests the fiber as Inactive (the historical behavior).

It is NOT consulted on untyped store reads (Context::get): the store holds type-erased values, so per-read checks would need downcasting machinery that no consumer has asked for. Services whose availability can change AFTER registration (circuit breakers, feature gates) must drive their dependents by re-providing / notifying instead of relying on spontaneous re-checks.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Service for ActiveRuns

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for AresConfigManager

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for AresVectorStore

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for AuthService

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for CalculatorService

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

impl Service for ConfigBasedLLMFactory

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for ContextProviderHandle

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for DeployRegistry

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for DynamicConfigManager

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for EmergencyStop

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for ExternalContext

Source§

impl Service for FleetSecrets

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for Http

Source§

fn name(&self) -> &'static str

Source§

impl Service for LoopRegistry

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for McpRegistry

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for McpService

Source§

fn name(&self) -> &'static str

Source§

fn check(&self) -> bool

Source§

impl Service for ModelOverride

Source§

impl Service for OverlayAgentConfigs

Source§

fn name(&self) -> &'static str

Source§

impl Service for PipelineFanoutHandle

Source§

fn name(&self) -> &'static str

Source§

impl Service for PipelineService

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

impl Service for PostgresClient

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for PostgresService

Source§

fn check(&self) -> bool

Source§

impl Service for PostgresService

Source§

fn name(&self) -> &'static str

Source§

fn check(&self) -> bool

Source§

impl Service for ProviderRegistry

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for RunTrackerHandle

Source§

fn name(&self) -> &'static str

Source§

impl Service for SchedulerService

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

impl Service for SkillEngine

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for SkillsService

Source§

fn name(&self) -> &'static str

Source§

fn check(&self) -> bool

Source§

impl Service for TenantDb

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for TenantModelPolicy

Source§

impl Service for TenantRealms

Source§

fn name(&self) -> &'static str

Source§

impl Service for ToonAgentsHandle

Source§

fn name(&self) -> &'static str

Source§

impl Service for TriggerService

Available on crate feature postgres only.
Source§

fn name(&self) -> &'static str

Source§

fn init( &self, ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

impl Service for UsageContext

Source§

fn name(&self) -> &'static str

Source§

fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>

Source§

fn check(&self) -> bool

Source§

impl Service for WorkflowEngine

Source§

fn name(&self) -> &'static str

Source§

fn check(&self) -> bool

Source§

impl Service for WorkflowSet

Source§

fn name(&self) -> &'static str

Implementors§