SubscriptionClientOptions
Defined in: packages/client/src/circuits/subscription-client.ts:63
Properties
Section titled “Properties”authHeaders?
Section titled “authHeaders?”
optionalauthHeaders?: () =>Record<string,string> |Promise<Record<string,string>>
Defined in: packages/client/src/circuits/subscription-client.ts:74
The caller’s own auth headers, resolved per request.
The SAME adapter the write path uses (ADR-0003): read and write authorization must not diverge, and a JWT that refreshed for one has refreshed for both.
Returns
Section titled “Returns”Record<string, string> | Promise<Record<string, string>>
controlPlaneUrl
Section titled “controlPlaneUrl”controlPlaneUrl:
string
Defined in: packages/client/src/circuits/subscription-client.ts:65
Base URL of the control plane — the pgxsinkit server.
fetch?
Section titled “fetch?”
optionalfetch?: typeoffetch
Defined in: packages/client/src/circuits/subscription-client.ts:90
onRevoked?
Section titled “onRevoked?”
optionalonRevoked?: (revoked) =>void
Defined in: packages/client/src/circuits/subscription-client.ts:81
Called when a scope is revoked. The subscriber truncates that scope and unsubscribes.
Parameters
Section titled “Parameters”revoked
Section titled “revoked”Returns
Section titled “Returns”void
refreshSkewSeconds?
Section titled “refreshSkewSeconds?”
optionalrefreshSkewSeconds?:number
Defined in: packages/client/src/circuits/subscription-client.ts:79
Re-mint this many seconds before the token expires. Default 60 — comfortably inside ADR-0055’s 5-minute default lifetime, and large enough that a slow round trip does not race the expiry.
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: packages/client/src/circuits/subscription-client.ts:89
Aborts in-flight control-plane requests on teardown.
Load-bearing rather than tidy: a client stopped while its control plane is unreachable has a
subscribe sitting on a TCP connect that can take minutes to fail, and stop() waits for the boot
tail. Without this, teardown is held hostage by a network that is already gone.
streamBaseUrl
Section titled “streamBaseUrl”streamBaseUrl:
string
Defined in: packages/client/src/circuits/subscription-client.ts:67
Base URL the edge serves streams from. streamPath is appended to it.