@nats-io/services
    Preparing search index...

    Type Alias ServiceConfig

    type ServiceConfig = {
        description?: string;
        metadata?: Record<string, string>;
        name: string;
        prefix?: string;
        queue?: string;
        statsHandler?: (endpoint: Endpoint) => Promise<unknown | null>;
        version: string;
    }
    Index
    description?: string

    Description for the service

    metadata?: Record<string, string>

    Optional metadata about the service

    name: string

    A type for a service

    prefix?: string

    Optional prefix for the service's discovery subjects (PING, STATS and INFO), used in place of $SRV the way a JetStream API prefix replaces $JS.API, so tools can reach the service across accounts. Its case is kept as given. Endpoints cannot be added under it. Defaults to $SRV.

    queue?: string

    Optional queue group to run the service in. If not set, default, is set to "q". Note that this configuration will be the default for all endpoints and groups. If set to an empty string, the service subscription will NOT have queue, and will not be run in a queue.

    statsHandler?: (endpoint: Endpoint) => Promise<unknown | null>

    A customized handler for the stats of an endpoint. The data returned by the endpoint will be serialized as is. If it throws or rejects, it is printed with console.error as an errors.UnhandledCallbackError, and the stats fail: stats() rejects, and a stats request gets an error response. The service continues.

    version: string

    A version identifier for the service