Meldbase TypeScript API
    Preparing search index...

    Interface WorkerOptions

    Configures worker identity, handlers, transport, reconnect timing, and lifecycle callbacks.

    interface WorkerOptions {
        methods?: Readonly<Record<string, RPCDefinition>>;
        onError?: (error: Error) => void;
        onStateChange?: (state: WorkerState) => void;
        readPolicies?: Readonly<Record<string, ReadPolicyDefinition>>;
        reconnectMaxMs?: number;
        reconnectMinMs?: number;
        token: string;
        url: string;
        webSocketFactory: WorkerSocketFactory;
        workerId: string;
    }
    Index
    methods?: Readonly<Record<string, RPCDefinition>>
    onError?: (error: Error) => void
    onStateChange?: (state: WorkerState) => void
    readPolicies?: Readonly<Record<string, ReadPolicyDefinition>>
    reconnectMaxMs?: number
    reconnectMinMs?: number
    token: string
    url: string

    A full ws(s):// worker control endpoint, or meldbase://host[:port]. The Meldbase authority form always resolves to wss://host[:port]/v1/workers.

    webSocketFactory: WorkerSocketFactory
    workerId: string