Applesauce
    Preparing search index...

    Interface CountServiceOptions

    Options for demand-driven event metric counts

    interface CountServiceOptions {
        attemptTimeout?: number;
        cache?: CountCache;
        cacheCapacity?: number;
        cacheRetention?: number;
        cacheTimeout?: number;
        concurrency?: number;
        countScheduler?: CountScheduler;
        diagnostic?: (event: CountDiagnostic) => void;
        logger?: Debugger;
        minimumRefresh?: number;
        random?: () => number;
        relays: CountList<string>;
        scheduler?: SchedulerLike;
        signal?: AbortSignal;
        ttl?: (context: CountFreshnessContext) => number;
    }
    Index
    attemptTimeout?: number

    The transport response budget including authentication in milliseconds, default 5000 and maximum 2147483647

    cache?: CountCache

    The optional Keyv-compatible persistent count cache; use a dedicated namespace

    cacheCapacity?: number

    The maximum inactive cached result entries, default 1000

    cacheRetention?: number

    The persistent retention lifetime in milliseconds, default 24 hours

    cacheTimeout?: number

    The maximum cache operation duration in milliseconds, default 1000 and maximum 2147483647

    concurrency?: number

    The maximum active COUNT requests per relay, default 20

    countScheduler?: CountScheduler

    The app-owned relay scheduler shared across services

    diagnostic?: (event: CountDiagnostic) => void

    The optional transport instrumentation callback

    logger?: Debugger

    The parent logger for the service and its relay attempts

    minimumRefresh?: number

    The minimum refresh interval in milliseconds, default 1000

    random?: () => number

    The deterministic random source for relay cooldown jitter

    relays: CountList<string>

    The trusted relay list for balanced NIP-45 counts

    scheduler?: SchedulerLike

    The clock for deadlines and deterministic tests

    signal?: AbortSignal

    The optional service cancellation signal

    ttl?: (context: CountFreshnessContext) => number

    The freshness curve receiving event age in seconds and returning milliseconds, defaulting to 1 minute through 6 hours