Interface IDecisionReplayService
- Namespace
- ReferenceApplication.Web.Governance.Replay
- Assembly
- ReferenceApplication.Web.dll
Finds persisted governance decisions and replays them against the current policy or a candidate policy.
public interface IDecisionReplayService
Properties
ConstraintNames
Gets the names of the registered constraints, in evaluation order.
IReadOnlyList<string> ConstraintNames { get; }
Property Value
Methods
FindAsync(string, CancellationToken)
Finds a persisted decision by its receipt identifier.
ValueTask<DecisionReplayDetails?> FindAsync(string decisionReceiptId, CancellationToken cancellationToken = default)
Parameters
decisionReceiptIdstringThe decision receipt identifier.
cancellationTokenCancellationTokenA token that cancels the query.
Returns
- ValueTask<DecisionReplayDetails>
The decision and what can be reconstructed from it, or null when it is unknown.
ListAsync(string?, CancellationToken)
Lists persisted decisions, newest first.
ValueTask<DecisionReplayPage?> ListAsync(string? before, CancellationToken cancellationToken = default)
Parameters
beforestringThe record identifier the previous page ended with, or null for the newest page.
cancellationTokenCancellationTokenA token that cancels the query.
Returns
- ValueTask<DecisionReplayPage>
The page, or null when the cursor is not a persisted decision.
ReplayAsync(HttpContext, string, DecisionReplayRequest, CancellationToken)
Replays a persisted decision. Nothing is persisted, and stored evidence is never changed.
ValueTask<DecisionReplayOutcome> ReplayAsync(HttpContext requestContext, string decisionReceiptId, DecisionReplayRequest request, CancellationToken cancellationToken = default)
Parameters
requestContextHttpContextThe request asking for the replay.
decisionReceiptIdstringThe decision receipt identifier.
requestDecisionReplayRequestWhat to replay against besides the current policy.
cancellationTokenCancellationTokenA token that cancels the replay.
Returns
- ValueTask<DecisionReplayOutcome>
The replay result, or why there is none.