Cotal TypeScript packages
    Preparing search index...

    Interface SpaceHostOptions<S>

    What a multi-space daemon supplies to runSpaceHost.

    interface SpaceHostOptions<S = undefined> {
        entry: string;
        label: string;
        log?: (line: string) => void;
        manifest: string;
        onStop?: (signal: Signals) => void;
        openDeadlineSeconds?: number;
        serving: string;
        settings?: SpaceSettings<S>;
        startup?: "every" | "servable";
        open(space: string, settings: S): Promise<SpaceLane>;
    }

    Type Parameters

    • S = undefined
    Index

    entry

    entry: string

    Names the command in a startup refusal, such as auth-service --callout-only --spaces.

    label: string

    Names the host in its log lines, such as auth callout host.

    log?: (line: string) => void

    Diagnostics sink. Default console.error.

    manifest: string

    Path of the manifest file.

    onStop?: (signal: Signals) => void

    Called once when SIGINT or SIGTERM starts the stop, before any lane closes.

    openDeadlineSeconds?: number

    How many seconds a pass waits for one space's open before serving the others without it. Default 30.

    serving: string

    What a lane does while it is up, for the loss line: answering, serving.

    settings?: SpaceSettings<S>

    Present for a host whose lanes take per-space settings: it reads version 2 manifests only. Absent, the host reads version 1 only, so neither kind of host runs on the other's file.

    startup?: "every" | "servable"

    every (the default) refuses to start unless every space opens, and leaves no lane running. servable starts with the spaces that open, reports each one that does not, and retries it as reconcile does after startup. A manifest that does not read whole refuses either way.