kinetex - v1.0.0-rc.1
    Preparing search index...

    Class RemoteTransport

    Remote transport — sends buffered log entries to an HTTP endpoint. Supports configurable batch size, flush interval, and custom fetch implementation.

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Parameters

      • endpoint: string

        HTTP endpoint to POST log batches to

      • options: {
            batchSize?: number;
            flushMs?: number;
            headers?: Record<string, string>;
            fetch?: {
                (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
                (input: string | URL | Request, init?: RequestInit): Promise<Response>;
            };
            onError?: (err: unknown) => void;
        } = {}

        Remote transport options

        • OptionalbatchSize?: number

          Maximum entries per batch. Default: 50

        • OptionalflushMs?: number

          Flush interval in ms. Default: 3000

        • Optionalheaders?: Record<string, string>

          Extra headers to include in the POST request

        • Optionalfetch?: {
              (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
              (input: string | URL | Request, init?: RequestInit): Promise<Response>;
          }

          Custom fetch implementation (for cross-runtime compat). Default: globalThis.fetch

        • OptionalonError?: (err: unknown) => void

          Error callback for background flush failures

      Returns RemoteTransport

    Methods