Skip to content

ITieredProvider TQuery,TResult

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework.Providers

ITieredProvider<TQuery,TResult> Interface

A provider in a priority-ordered fallback chain. Providers are tried in order of ascending Priority until one succeeds or all fail.

public interface ITieredProvider<in TQuery,TResult>

Type parameters

TQuery

The query/request type.

TResult

The result type.

Properties

ITieredProvider<TQuery,TResult>.IsEnabled Property

Gets whether this provider is enabled and should participate in the chain.

bool IsEnabled { get; }

Property Value

System.Boolean

ITieredProvider<TQuery,TResult>.Name Property

Gets the provider's display name (used in diagnostics and logging).

string Name { get; }

Property Value

System.String

ITieredProvider<TQuery,TResult>.Priority Property

Gets the priority for ordering. Lower values = higher priority (tried first).

int Priority { get; }

Property Value

System.Int32

Methods

ITieredProvider<TQuery,TResult>.ExecuteAsync(TQuery, CancellationToken) Method

Executes the query against this provider.

System.Threading.Tasks.Task<TResult> ExecuteAsync(TQuery query, System.Threading.CancellationToken cancellationToken);

Parameters

query TQuery

cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task<TResult>

Exceptions

ProviderUnavailableException
The provider is temporarily unavailable. The selector will try the next provider.