Documentation
    Preparing search index...

    Class Registry<A>

    Type Parameters

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Runs the registry for a server.

      Parameters

      • OptionalinputConfig: {
            autoConfigureServerless?:
                | boolean
                | {
                    headers?: Record<string, string>;
                    maxRunners?: number;
                    metadata?: Record<string, unknown>;
                    minRunners?: number;
                    requestLifespan?: number;
                    runnersMargin?: number;
                    slotsPerRunner?: number;
                    url?: string;
                };
            basePath?: string;
            defaultServerPort?: number;
            disableActorDriver?: boolean;
            disableDefaultServer?: boolean;
            disableMetadataLookup?: boolean;
            driver?: {
                actor: ActorDriverBuilder;
                manager: ManagerDriverBuilder;
                name: string;
            };
            encoding?: "json"
            | "cbor"
            | "bare";
            endpoint?: string;
            getUpgradeWebSocket?: GetUpgradeWebSocket;
            headers?: Record<string, string>;
            inspector?: {
                defaultEndpoint?: string;
                enabled?: boolean | { actor?: boolean; manager?: boolean };
                token?: (...args: unknown[]) => string;
            };
            logging?: {
                baseLogger?: Logger;
                level?: "error"
                | "trace"
                | "fatal"
                | "warn"
                | "info"
                | "debug"
                | "silent";
            };
            maxIncomingMessageSize?: number;
            namespace?: string;
            noWelcome?: boolean;
            overrideServerAddress?: string;
            runEngine?: boolean;
            runEngineVersion?: string;
            runnerKey?: string;
            runnerKind?: "serverless"
            | "normal";
            runnerName?: string;
            token?: string;
            totalSlots?: number;
        }
        • Optional ExperimentalautoConfigureServerless?:
              | boolean
              | {
                  headers?: Record<string, string>;
                  maxRunners?: number;
                  metadata?: Record<string, unknown>;
                  minRunners?: number;
                  requestLifespan?: number;
                  runnersMargin?: number;
                  slotsPerRunner?: number;
                  url?: string;
              }

          Automatically configure serverless runners in the engine. Can only be used when runnerKind is "serverless". If true, uses default configuration. Can also provide custom configuration.

        • Optional ExperimentalbasePath?: string

          Base path for the router. This is used to prefix all routes. For example, if the base path is /api, then the route /actors will be available at /api/actors.

        • Optional ExperimentaldefaultServerPort?: number
        • Optional ExperimentaldisableActorDriver?: boolean
        • Optional ExperimentaldisableDefaultServer?: boolean
        • OptionaldisableMetadataLookup?: boolean

          Whether to automatically perform health checks when the client is created.

        • Optionaldriver?: { actor: ActorDriverBuilder; manager: ManagerDriverBuilder; name: string }
          • actor: ActorDriverBuilder
          • manager: ManagerDriverBuilder
          • name: string

            Machine-readable name to identify this driver by.

        • Optionalencoding?: "json" | "cbor" | "bare"
        • Optionalendpoint?: string

          Endpoint to connect to for Rivet Engine or RivetKit manager API.

        • OptionalgetUpgradeWebSocket?: GetUpgradeWebSocket
        • Optionalheaders?: Record<string, string>
        • Optional Experimentalinspector?: {
              defaultEndpoint?: string;
              enabled?: boolean | { actor?: boolean; manager?: boolean };
              token?: (...args: unknown[]) => string;
          }
          • OptionaldefaultEndpoint?: string

            Default RivetKit server endpoint for Rivet Inspector to connect to. This should be the same endpoint as what you use for your Rivet client to connect to RivetKit.

            This is a convenience property just for printing out the inspector URL.

          • Optionalenabled?: boolean | { actor?: boolean; manager?: boolean }
          • Optionaltoken?: (...args: unknown[]) => string

            Token used to access the Inspector.

        • Optional Experimentallogging?: {
              baseLogger?: Logger;
              level?: "error" | "trace" | "fatal" | "warn" | "info" | "debug" | "silent";
          }
        • Optional ExperimentalmaxIncomingMessageSize?: number
        • Optionalnamespace?: string

          Namespace to connect to.

        • Optional ExperimentalnoWelcome?: boolean

          Disable welcome message.

        • Optional ExperimentaloverrideServerAddress?: string
        • Optional ExperimentalrunEngine?: boolean
        • Optional ExperimentalrunEngineVersion?: string
        • OptionalrunnerKey?: string

          Unique key for this runner. Runners connecting a given key will replace any other runner connected with the same key.

        • Optional ExperimentalrunnerKind?: "serverless" | "normal"

          Whether to run runners normally or have them managed serverlessly (by the Rivet Engine for example).

        • OptionalrunnerName?: string

          Name of the runner. This is used to group together runners in to different pools.

        • Optionaltoken?: string

          Token to use to authenticate with the API.

        • OptionaltotalSlots?: number

          How many actors this runner can run.

      Returns ServerOutput<Registry<A>>