Skip to main content

PluginRuntime

Trait PluginRuntime 

Source
pub trait PluginRuntime: Send + Sync {
    // Required methods
    fn instantiate_router(
        &self,
        manifest: &PluginManifest,
    ) -> Result<Arc<dyn RouterPlugin>, RuntimeError>;
    fn instantiate_dialect(
        &self,
        manifest: &PluginManifest,
    ) -> Result<Arc<dyn UpstreamDialect>, RuntimeError>;
    fn instantiate_observability(
        &self,
        manifest: &PluginManifest,
    ) -> Result<Arc<dyn ObservabilityHook>, RuntimeError>;

    // Provided method
    fn instantiate_signer_factory(
        &self,
        _manifest: &PluginManifest,
    ) -> Result<Arc<dyn SignerFactory>, RuntimeError> { ... }
}
Expand description

Runtime abstraction for concrete plugin systems (currently wasmtime).

Required Methods§

Source

fn instantiate_router( &self, manifest: &PluginManifest, ) -> Result<Arc<dyn RouterPlugin>, RuntimeError>

Instantiates a router plugin.

Source

fn instantiate_dialect( &self, manifest: &PluginManifest, ) -> Result<Arc<dyn UpstreamDialect>, RuntimeError>

Instantiates an upstream dialect plugin.

Source

fn instantiate_observability( &self, manifest: &PluginManifest, ) -> Result<Arc<dyn ObservabilityHook>, RuntimeError>

Instantiates an observability hook plugin.

Provided Methods§

Source

fn instantiate_signer_factory( &self, _manifest: &PluginManifest, ) -> Result<Arc<dyn SignerFactory>, RuntimeError>

Instantiates a signer factory plugin.

Signer plugin extension is no longer supported — cc-lb-server uses built-in AnthropicKeySigner / AnthropicOAuthSigner directly. New runtime impls should leave the default unimplemented!() body in place. The trait method is retained as a deprecated shim so that out-of-tree runtimes do not see a hard trait-shape break; it is scheduled for removal in the next semver-major bump.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§