vigiles API reference
    Preparing search index...

    Interface ServiceHandleExperimental

    A started service, handed to measure((ctx) => …) as ctx.service(name) so a check can inspect the REAL resulting state.

    NOTE: ServiceHandle.exec is SYNCHRONOUS on purpose — the eval measure callback is synchronous (it blocks via spawnSync, like judge()), so state inspection must be sync too. exec is the ONLY inspection primitive by design: it shells the service's own CLI (psql, redis-cli, …) so vigiles never takes a per-service client dependency.

    interface ServiceHandle {
        host: string;
        port?: number;
        url?: string;
        exec(command: string): { code: number; stderr: string; stdout: string };
    }
    Index

    Properties

    Methods

    Properties

    host: string

    Host the agent reaches the service on (from inside the run environment).

    port?: number

    The published host port — undefined for a service that exposes none.

    url?: string

    A connection URL when the runtime can form one; omitted otherwise (build your own from host + port — the scheme differs per service, so no generic URL).

    Methods

    • Experimental

      Run a command inside the container and read its result (synchronous).

      Parameters

      • command: string

      Returns { code: number; stderr: string; stdout: string }