| | | 1 | | namespace NexusLabs.Needlr.AgentFramework.Providers; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Diagnostic context passed to <see cref="ProviderFailurePolicy.OnHit"/> when a |
| | | 5 | | /// matching failure policy is applied to a provider's thrown exception. |
| | | 6 | | /// </summary> |
| | | 7 | | /// <param name="ProviderName"> |
| | | 8 | | /// Name of the failing provider (from <see cref="ITieredProvider{TQuery, TResult}.Name"/>). |
| | | 9 | | /// </param> |
| | | 10 | | /// <param name="Exception"> |
| | | 11 | | /// The exception that was thrown by |
| | | 12 | | /// <see cref="ITieredProvider{TQuery, TResult}.ExecuteAsync"/> and matched by the policy. |
| | | 13 | | /// </param> |
| | | 14 | | /// <param name="SkipUntil"> |
| | | 15 | | /// The absolute UTC timestamp until which the provider will be skipped on subsequent |
| | | 16 | | /// calls, or <see langword="null"/> when the matched policy specified |
| | | 17 | | /// <see cref="ProviderFailurePolicy.SkipDuration"/> as <see langword="null"/> (i.e. no |
| | | 18 | | /// cross-call skip applied). When the policy specified |
| | | 19 | | /// <see cref="ProviderFailurePolicy.IndefiniteSkip"/>, this resolves to |
| | | 20 | | /// <see cref="DateTimeOffset.MaxValue"/>. |
| | | 21 | | /// </param> |
| | 10 | 22 | | public sealed record ProviderFailureContext( |
| | 2 | 23 | | string ProviderName, |
| | 2 | 24 | | Exception Exception, |
| | 15 | 25 | | DateTimeOffset? SkipUntil); |