Skip to content

TransportContext

Namespace: E2E.Engine.Protocol

public sealed record TransportContext : IEquatable<TransportContext>

What a transport knows when it opens a connection. Upstream’s TransportContext (engine/protocol/transport.ts).

Inheritance: object

Implements: IEquatable<TransportContext>

View source

public EngineAppInfo? App { get; init; }

The app the target declares, as prepare, init, and doctor receive it: what a transport that provisions a machine installs there (a build at AppPath, relative to Cwd), since a server elsewhere cannot read the project’s files. Null for a connection opened outside those hooks.

Value: EngineAppInfo

public required string Cwd { get; init; }

The project root, where relative paths resolve.

Value: string

public required IReadOnlyDictionary<string, string?> Env { get; init; }

The environment the harness would start a worker with.

Value: IReadOnlyDictionary<string, string>

public required string Role { get; init; }

The connection’s role; see Role.

Value: string

public CancellationToken Signal { get; init; }

Cancels when opening must stop; it never cancels once OpenAsync(TransportContext) has returned.

Value: CancellationToken