Table of Contents

Class OpenShellClientOptions

Namespace
OpenShell
Assembly
OpenShell.Sdk.dll

Configures an OpenShellClient.

public sealed record OpenShellClientOptions : IEquatable<OpenShellClientOptions>
Inheritance
OpenShellClientOptions
Implements
Inherited Members

Properties

Address

Gateway address, for example https://gateway.example.com.

public required Uri Address { get; init; }

Property Value

Uri

AllowInsecureAuth

Permits sending credentials over plaintext http:// to a non-loopback host. Off by default because it leaks the credential on the wire.

public bool AllowInsecureAuth { get; init; }

Property Value

bool

Auth

Authentication; defaults to None.

public IAuthProvider Auth { get; init; }

Property Value

IAuthProvider

DefaultTimeout

Deadline applied to unary calls that do not set their own. Null means none.

public TimeSpan? DefaultTimeout { get; init; }

Property Value

TimeSpan?

DefaultWorkspace

Workspace used when none is given. Defaults to default.

public string DefaultWorkspace { get; init; }

Property Value

string

HttpHandler

Replaces the HTTP handler. Intended for tests and custom proxies; Tls is then ignored.

public HttpMessageHandler? HttpHandler { get; init; }

Property Value

HttpMessageHandler

LoggerFactory

Optional logger factory.

public ILoggerFactory? LoggerFactory { get; init; }

Property Value

ILoggerFactory

Retry

Retry behaviour for transient failures. Defaults to Default; use None to disable.

public RetryPolicy Retry { get; init; }

Property Value

RetryPolicy

RouteToOwnerReplica

Sends exec, interactive exec, port forwarding, and SSH streams straight to the gateway replica that holds the sandbox's supervisor session, when a multi-replica gateway reports one (x-openshell-owner). On by default; it is gRPC metadata only, a single-replica gateway ignores it, and a routed stream that cannot reach its replica is reopened unrouted once.

public bool RouteToOwnerReplica { get; init; }

Property Value

bool

Tls

TLS settings; ignored for http://.

public TlsOptions? Tls { get; init; }

Property Value

TlsOptions

Methods

Validate()

Throws OpenShellException (InvalidConfig) when the options are inconsistent or unsafe, without connecting.

public void Validate()