Skip to content

connectLeased

connectLeased<T>(entry, context, options): Promise<{ lease: HeldConnection; value: T; }>

Defined in: packages/core/src/adapters/remote-lease.ts:61

Connect (calling connect when it is a function) and open the connection, as one retried attempt: a failed handshake releases its lease as failed before the next attempt connects again, so at most one lease is held per connection. On success the caller owns the returned lease and must call HeldConnection.end; on failure nothing is held and a TargetLaunchError is thrown.

T

RemoteTarget

ConnectLeasedContext

ConnectLeasedOptions<T>

Promise<{ lease: HeldConnection; value: T; }>