Skip to content

ChainGraph API Documentation / @badaitech/chaingraph-channel / types / TRPCChannelConfig

Interface: TRPCChannelConfig ​

Defined in: types/ChannelConfig.d.ts:233

Configuration for TRPCChannel (future implementation).

Extends ​

Properties ​

authToken? ​

optional authToken: string

Defined in: types/ChannelConfig.d.ts:245

Authentication token (optional).


cleanupStrategy? ​

optional cleanupStrategy: BufferCleanupStrategy

Defined in: types/ChannelConfig.d.ts:28

Buffer cleanup strategy when maxBufferSize is reached.

  • min-position: Keep items from slowest subscriber forward (fair to all)
  • sliding-window: Always keep last N items (simple, may drop slow consumers)
  • time-based: Remove items older than maxBufferAge
  • none: No cleanup (unbounded growth)

Default ​

ts
'min-position'

Inherited from ​

BaseChannelConfig.cleanupStrategy


maxBufferAge? ​

optional maxBufferAge: number

Defined in: types/ChannelConfig.d.ts:36

Maximum age of buffered items in milliseconds (for time-based cleanup).

Only used when cleanupStrategy is 'time-based'.

Default ​

ts
60000 (1 minute)

Inherited from ​

BaseChannelConfig.maxBufferAge


maxBufferSize? ​

optional maxBufferSize: number

Defined in: types/ChannelConfig.d.ts:17

Maximum buffer size (0 = unbounded)

When buffer exceeds this size, cleanup is triggered based on cleanupStrategy.

Default ​

ts
1000 for InMemoryChannel

Default ​

ts
0 for DBOSChannel (database-backed, no in-memory buffer limit)

Inherited from ​

BaseChannelConfig.maxBufferSize


streamKey ​

streamKey: string

Defined in: types/ChannelConfig.d.ts:241

Stream identifier on the server.


trpcUrl ​

trpcUrl: string

Defined in: types/ChannelConfig.d.ts:237

tRPC server URL.


wsConfig? ​

optional wsConfig: object

Defined in: types/ChannelConfig.d.ts:249

WebSocket configuration for subscriptions.

autoReconnect? ​

optional autoReconnect: boolean

Reconnect on disconnect.

Default ​
ts
true

maxReconnectAttempts? ​

optional maxReconnectAttempts: number

Maximum reconnect attempts.

Default ​
ts
10

reconnectDelay? ​

optional reconnectDelay: number

Reconnect delay in milliseconds.

Default ​
ts
1000

Licensed under BUSL-1.1