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

    Type Alias ServiceConfig

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

    Properties

    description?: string

    Description for the service

    metadata?: Record<string, string>

    Optional metadata about the service

    name: string

    A type for a service

    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

    version: string

    A version identifier for the service