mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Track mutable provider state and publish immutable operation batches. Keep path codecs isolated per client subscription and state member.
13 lines
492 B
TypeScript
13 lines
492 B
TypeScript
import { type Context, defineService, type ReplicatedState } from "@earendil-works/chord";
|
|
|
|
export interface ExampleFacetReply {
|
|
readonly message: string;
|
|
readonly workerActivations: number;
|
|
}
|
|
|
|
export interface ExampleFacetService {
|
|
readonly workerActivations: ReplicatedState<{ count: number }>;
|
|
greet(input: { readonly name: string }, context: Context): Promise<ExampleFacetReply>;
|
|
}
|
|
|
|
export const ExampleFacetService = defineService<ExampleFacetService>("pi.example-plugin.greeting");
|