pub struct ProviderRuntimeRegistry { /* private fields */ }Expand description
Registry mapping Provider → runtime implementation.
Implementations§
Source§impl ProviderRuntimeRegistry
impl ProviderRuntimeRegistry
Sourcepub fn empty() -> ProviderRuntimeRegistry
pub fn empty() -> ProviderRuntimeRegistry
Empty registry — no runtimes registered.
Sourcepub fn with_runtime(
self,
runtime: Arc<dyn ProviderRuntime>,
) -> ProviderRuntimeRegistry
pub fn with_runtime( self, runtime: Arc<dyn ProviderRuntime>, ) -> ProviderRuntimeRegistry
Install a runtime for a catalog-supported provider, replacing any previously registered runtime for that provider.
Custom runtimes can replace credential resolution and client
construction for an existing provider identity, but they cannot add
backend/auth matrix edges. Unsupported provider identities are ignored
here so direct with_runtime() calls cannot become a parallel catalog.
pub fn get(&self, provider: Provider) -> Option<&Arc<dyn ProviderRuntime>>
Sourcepub async fn resolve(
&self,
realm: &RealmConnectionSet,
auth_binding: &AuthBindingRef,
env: &ResolverEnvironment,
) -> Result<ResolvedConnection, ProviderAuthError>
pub async fn resolve( &self, realm: &RealmConnectionSet, auth_binding: &AuthBindingRef, env: &ResolverEnvironment, ) -> Result<ResolvedConnection, ProviderAuthError>
Resolve a binding from a realm connection set through the matching
provider runtime. Validates through ProviderRuntimeCatalog, then
dispatches resolve_binding on the runtime registered for the
validated provider.
Sourcepub fn build_client(
&self,
connection: ResolvedConnection,
) -> Result<Arc<dyn LlmClient>, ProviderClientError>
pub fn build_client( &self, connection: ResolvedConnection, ) -> Result<Arc<dyn LlmClient>, ProviderClientError>
Build a client from a resolved connection through the matching provider runtime.
Sourcepub fn build_image_generation_executor(
&self,
connection: ResolvedConnection,
) -> Result<Option<Arc<dyn ImageGenerationExecutor>>, ProviderClientError>
pub fn build_image_generation_executor( &self, connection: ResolvedConnection, ) -> Result<Option<Arc<dyn ImageGenerationExecutor>>, ProviderClientError>
Build the optional image-generation executor owned by the same provider runtime and resolved connection.