@qualithm/rqlite-client - v0.2.3
    Preparing search index...

    Type Alias RqliteConfig

    Configuration for the rqlite client.

    type RqliteConfig = {
        auth?: RqliteAuth;
        consistencyLevel?: ConsistencyLevel;
        fetch?: typeof fetch;
        followRedirects?: boolean;
        freshness?: FreshnessOptions;
        host: string;
        maxRedirects?: number;
        maxRetries?: number;
        retryBaseDelay?: number;
        timeout?: number;
        tls?: boolean;
    }
    Index

    Properties

    auth?: RqliteAuth

    Basic authentication credentials.

    consistencyLevel?: ConsistencyLevel

    Default consistency level for queries.

    fetch?: typeof fetch

    Custom fetch implementation to use for HTTP requests.

    Supply a pre-configured fetch function to enable mTLS or other advanced transport options. When omitted, the global fetch is used.

    // Node.js with undici
    import { Agent, fetch as undiciFetch } from "undici"
    const agent = new Agent({ connect: { ca, cert, key } })
    const client = createRqliteClient({
    host: "localhost:4001",
    tls: true,
    fetch: (input, init) => undiciFetch(input, { ...init, dispatcher: agent }),
    })
    followRedirects?: boolean

    Automatically follow leader redirects (HTTP 301/307). Defaults to true.

    freshness?: FreshnessOptions

    Default freshness options for stale reads.

    host: string

    Host and port of the rqlite node (e.g. "localhost:4001").

    maxRedirects?: number

    Maximum number of leader redirect attempts. Defaults to 5.

    maxRetries?: number

    Maximum number of retry attempts for transient failures. Defaults to 3.

    retryBaseDelay?: number

    Base delay in milliseconds for exponential backoff between retries. Defaults to 100.

    timeout?: number

    Default request timeout in milliseconds.

    tls?: boolean

    Use HTTPS instead of HTTP.