Skip to content

EngineAttemptContext

Namespace: E2E.Engine

public sealed class EngineAttemptContext

Upstream’s EngineAttemptContext (engine/index.ts): what an engine’s StartAttempt is given once per attempt, with the callbacks that carry what the engine learns back to the harness. Over the engine protocol each callback is a message to the client.

Inheritance: object

View source

public required Action<AppLogEntry> AppLog { get; init; }

Takes one line of what the app did on its own. Upstream’s appLog.

Value: Action<AppLogEntry>

public required string ArtifactsDir { get; init; }

The attempt’s artifact directory. Upstream’s artifactsDir.

Value: string

public required string AttemptId { get; init; }

The attempt’s id. Upstream’s attemptId.

Value: string

public required Action<IReadOnlyDictionary<string, string>> Environment { get; init; }

Takes the facts the engine learns about what the attempt runs on. Upstream’s environment.

Value: Action<IReadOnlyDictionary<string, string>>

public required Action<string> Navigation { get; init; }

Takes one line saying where the app went on its own. Upstream’s navigation.

Value: Action<string>

public required Func<Secret, ResolveSecretOptions?, Task<string>> ResolveSecret { get; init; }

The plaintext of a secret the engine holds, resolved on the client. Upstream’s resolveSecret.

Value: Func<Secret, ResolveSecretOptions, Task<string>>

public Action<EngineSnapshot>? Screen { get; init; }

Takes the screen an action left; null when the attempt keeps no trace. Upstream’s screen.

Value: Action<EngineSnapshot>

public CancellationToken Signal { get; init; }

Aborts when the attempt is abandoned. Upstream’s signal.

Value: CancellationToken