Class FlowReplay

Namespace
Kuestenlogik.Bowire.Flows
Assembly
Kuestenlogik.Bowire.Flows.dll

#1051 — plays a recording back into a system: each recorded call as one send, each recorded stream as one send per frame, through the plugin's own invoke path, at the recorded pace or back to back. The first send the target refuses (an Akka host's Tell policy, a broker's ACL) stops the playback, and the outcome says which send and why. bowire test and the workbench both play through here.

public static class FlowReplay
Inheritance
FlowReplay
Inherited Members

Methods

IsOriginalPace(string?)

Whether pace asks for the recorded spacing (the default) rather than fast.

public static bool IsOriginalPace(string? pace)

Parameters

pace string

Returns

bool

ParseRecording(string, string?, string)

A recording from a file's text: a single recording, or a store from which select (id or name) picks one. Throws InvalidDataException saying what is wrong.

public static BowireRecording ParseRecording(string json, string? select, string source)

Parameters

json string
select string
source string

Returns

BowireRecording

PlayAsync(IReadOnlyList<FlowReplaySend>, BowireProtocolRegistry, bool, string?, Func<string, string>?, Func<string, string?>?, int, CancellationToken)

Send sends in order. With originalPace each waits until its recorded offset from the start — the pace is the point of the playback — otherwise they go back to back. resolve substitutes variables in the method, body and server URL; refuseTarget, when given, names a reason a server URL may not be dialled. The first send that fails or is refused stops the playback.

public static Task<FlowReplayOutcome> PlayAsync(IReadOnlyList<FlowReplaySend> sends, BowireProtocolRegistry registry, bool originalPace, string? serverUrl, Func<string, string>? resolve, Func<string, string?>? refuseTarget, int skipped, CancellationToken ct)

Parameters

sends IReadOnlyList<FlowReplaySend>
registry BowireProtocolRegistry
originalPace bool
serverUrl string
resolve Func<string, string>
refuseTarget Func<string, string>
skipped int
ct CancellationToken

Returns

Task<FlowReplayOutcome>

SendsOf(BowireRecording, BowireProtocolRegistry, FlowReplaySpec, out int)

The sends that reproduce recording, in order, each with its offset from the first. A recorded stream gives one send per frame where the plugin can map frames back to sends; frames and steps that cannot be sent again (a channel, a frame the plugin does not map) are counted in skipped.

public static List<FlowReplaySend> SendsOf(BowireRecording recording, BowireProtocolRegistry registry, FlowReplaySpec spec, out int skipped)

Parameters

recording BowireRecording
registry BowireProtocolRegistry
spec FlowReplaySpec
skipped int

Returns

List<FlowReplaySend>