ITieredProviderSelector TQuery,TResult
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework.Providers¶
ITieredProviderSelector<TQuery,TResult> Interface¶
Executes a query against a priority-ordered chain of ITieredProvider<TQuery,TResult> instances, falling through to the next provider on failure or quota exhaustion.
Type parameters¶
TQuery
The query/request type.
TResult
The result type.
Derived
↳ TieredProviderSelector<TQuery,TResult>
Methods¶
ITieredProviderSelector<TQuery,TResult>.ExecuteAsync(TQuery, CancellationToken) Method¶
Executes the query against providers in priority order until one succeeds.
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¶
NoProvidersRegisteredException
No enabled providers were registered, so there was nothing to attempt.
AllProvidersFailedException
At least one provider was registered, but every provider failed or was denied by the quota gate.
Remarks¶
Both exceptions inherit from NoProvidersAvailableException, so callers can catch that base type to handle both conditions uniformly.