Class ExecBuilder

Namespace: redb.Route.Exec
Assembly: redb.Route.Exec.dll

Fluent builder for exec endpoint URIs. Scheme: exec.

public sealed class ExecBuilder

Inheritance

Object→ExecBuilder

Methods

AllowedCommands(params string[])

Restrict execution to the given command names (file-name-only, case-insensitive).

public ExecBuilder AllowedCommands(params string[] commands)

Args(params string[])

Default argument list (whitespace-separated; quotes preserved).

public ExecBuilder Args(params string[] args)

Build()

Build the URI string.

public string Build()

CaptureStderrInBody(bool)

Whether to fold stderr into the body (default true).

public ExecBuilder CaptureStderrInBody(bool value = true)

Command(string)

The command to execute (overrides the constructor argument).

public ExecBuilder Command(string command)

EnvOverride(string, string)

Add or override an environment variable.

public ExecBuilder EnvOverride(string key, string value)

JsonResponse(bool)

Whether the outbound body is a JSON object (default true).

public ExecBuilder JsonResponse(bool value = true)

MaxStderrBytes(int)

Cap stderr capture (bytes).

public ExecBuilder MaxStderrBytes(int bytes)

MaxStdoutBytes(int)

Cap stdout capture (bytes).

public ExecBuilder MaxStdoutBytes(int bytes)

Schedule(string)

Schedule the consumer to fire on a fixed interval (e.g. "30s", "5m").

public ExecBuilder Schedule(string schedule)

ScrubEnvironment(bool)

When set, the spawned process inherits no host environment variables.

public ExecBuilder ScrubEnvironment(bool value = true)

TimeoutMs(int)

Wall-clock timeout in milliseconds (0 = unlimited).

public ExecBuilder TimeoutMs(int ms)

ToString()

Returns a string that represents the current object.

public override string ToString()

WorkingDirectory(string)

Working directory for the spawned process.

public ExecBuilder WorkingDirectory(string path)