Table of Contents

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

IReadOnlyList<string>

Methods

FindAsync(string, CancellationToken)

Finds a persisted decision by its receipt identifier.

ValueTask<DecisionReplayDetails?> FindAsync(string decisionReceiptId, CancellationToken cancellationToken = default)

Parameters

decisionReceiptId string

The decision receipt identifier.

cancellationToken CancellationToken

A 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

before string

The record identifier the previous page ended with, or null for the newest page.

cancellationToken CancellationToken

A 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

requestContext HttpContext

The request asking for the replay.

decisionReceiptId string

The decision receipt identifier.

request DecisionReplayRequest

What to replay against besides the current policy.

cancellationToken CancellationToken

A token that cancels the replay.

Returns

ValueTask<DecisionReplayOutcome>

The replay result, or why there is none.