Skip to content

RefCounted

Defined in: packages/core/src/adapters/remote-pool.ts:50

A reference-counted resource, wired into a service’s connect and release.

TResource

connect(build): (context) => Promise<RemoteLeasedConnection<PoolLease>>

Defined in: packages/core/src/adapters/remote-pool.ts:52

Build the service’s connect: build gets the shared resource and returns the connection.

(resource, context) => RemoteConnection | Promise<RemoteConnection>

(context) => Promise<RemoteLeasedConnection<PoolLease>>


dispose(): void

Defined in: packages/core/src/adapters/remote-pool.ts:63

Unregister from shutdown and drop the idle timer, without closing (for tests).

void


flush(): Promise<void>

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

Close now: abort a pending open, then close the resource. Runs at shutdown.

Promise<void>


release(lease, info): Promise<void>

Defined in: packages/core/src/adapters/remote-pool.ts:59

The service’s release.

PoolLease

RemoteReleaseInfo

Promise<void>