Service
Defined in: Contract.ts:24
RPC types stay inside the descriptor; Graft supplies its dynamic activation context.
Extends
Section titled “Extends”ProvidedContract
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
R |
never |
ClientR |
never |
Properties
Section titled “Properties”clients
Section titled “clients”readonly clients: (port: { clientProtocol: (endpoint: string) => { codecFor: CodecFor; run: (clientId: number, f: (data: FromServerEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, request: FromClientEncoded, transferables?: readonly Transferable[]) => Effect<void, RpcClientError>; supportsAck: boolean; supportsTransferables: boolean; };}) => Effect<Context<never>, never, Scope | ClientR>;Defined in: Contract.ts:34
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
port |
{ clientProtocol: (endpoint: string) => { codecFor: CodecFor; run: (clientId: number, f: (data: FromServerEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, request: FromClientEncoded, transferables?: readonly Transferable[]) => Effect<void, RpcClientError>; supportsAck: boolean; supportsTransferables: boolean; }; } |
port.clientProtocol |
(endpoint: string) => { codecFor: CodecFor; run: (clientId: number, f: (data: FromServerEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, request: FromClientEncoded, transferables?: readonly Transferable[]) => Effect<void, RpcClientError>; supportsAck: boolean; supportsTransferables: boolean; } |
Returns
Section titled “Returns”Effect<Context<never>, never, Scope | ClientR>
facade
Section titled “facade”readonly facade: Facade;Defined in: Contract.ts:32
Private clients and a fork-owned facade for unary transitions.
readonly group: Pick<RpcGroup.RpcGroup<Rpc.Any>, "requests">;Defined in: Contract.ts:27
readonly key: Key<unknown, unknown>;Defined in: Contract.ts:26
Overrides
Section titled “Overrides”Plugin.ProvidedContract.key
operations
Section titled “operations”readonly operations: readonly { name: string; version: number;}[];Defined in: ../../core/src/Plugin.ts:86
Inherited from
Section titled “Inherited from”Plugin.ProvidedContract.operations
publish
Section titled “publish”readonly publish: (port: { clientProtocol: (endpoint: string) => { codecFor: CodecFor; run: (clientId: number, f: (data: FromServerEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, request: FromClientEncoded, transferables?: readonly Transferable[]) => Effect<void, RpcClientError>; supportsAck: boolean; supportsTransferables: boolean; };}) => Effect<void, ServiceConflict, Scope | Graft | ClientR>;Defined in: Contract.ts:37
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
port |
{ clientProtocol: (endpoint: string) => { codecFor: CodecFor; run: (clientId: number, f: (data: FromServerEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, request: FromClientEncoded, transferables?: readonly Transferable[]) => Effect<void, RpcClientError>; supportsAck: boolean; supportsTransferables: boolean; }; } |
port.clientProtocol |
(endpoint: string) => { codecFor: CodecFor; run: (clientId: number, f: (data: FromServerEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, request: FromClientEncoded, transferables?: readonly Transferable[]) => Effect<void, RpcClientError>; supportsAck: boolean; supportsTransferables: boolean; } |
Returns
Section titled “Returns”Effect<void, ServiceConflict, Scope | Graft | ClientR>
readonly serve: (port: { serverProtocol: (endpoint: string) => { clientIds: Effect<ReadonlySet<number>>; codecFor: CodecFor; disconnects: Dequeue<number>; end: (clientId: number) => Effect<void>; initialMessage: Effect<Option<unknown>>; run: (f: (clientId: number, data: FromClientEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, response: FromServerEncoded, transferables?: readonly Transferable[]) => Effect<void>; supportsAck: boolean; supportsNotifications: boolean; supportsSpanPropagation: boolean; supportsTransferables: boolean; };}) => Effect<never, never, R>;Defined in: Contract.ts:28
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
port |
{ serverProtocol: (endpoint: string) => { clientIds: Effect<ReadonlySet<number>>; codecFor: CodecFor; disconnects: Dequeue<number>; end: (clientId: number) => Effect<void>; initialMessage: Effect<Option<unknown>>; run: (f: (clientId: number, data: FromClientEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, response: FromServerEncoded, transferables?: readonly Transferable[]) => Effect<void>; supportsAck: boolean; supportsNotifications: boolean; supportsSpanPropagation: boolean; supportsTransferables: boolean; }; } |
port.serverProtocol |
(endpoint: string) => { clientIds: Effect<ReadonlySet<number>>; codecFor: CodecFor; disconnects: Dequeue<number>; end: (clientId: number) => Effect<void>; initialMessage: Effect<Option<unknown>>; run: (f: (clientId: number, data: FromClientEncoded) => Effect<void>) => Effect<never>; send: (clientId: number, response: FromServerEncoded, transferables?: readonly Transferable[]) => Effect<void>; supportsAck: boolean; supportsNotifications: boolean; supportsSpanPropagation: boolean; supportsTransferables: boolean; } |
Returns
Section titled “Returns”Effect<never, never, R>
readonly unary: boolean;Defined in: Contract.ts:33