cockpit-plugin-base-react - v1.1.1
    Preparing search index...

    Interface PollingFetchResult<T>

    Result returned by usePollingFetch.

    interface PollingFetchResult<T> {
        consecutiveErrors: number;
        data: T;
        error: string | null;
        loading: boolean;
        refresh: () => Promise<void>;
    }

    Type Parameters

    • T
    Index

    Properties

    consecutiveErrors: number

    Number of consecutive failures since the last successful fetch. Resets to 0 on success.

    data: T

    Most recently fetched value, or initial before the first fetch completes.

    error: string | null

    Error message from the most recent failed fetch, or null.

    loading: boolean

    true only during the initial fetch — background polls update silently.

    refresh: () => Promise<void>

    Manually triggers a fetch; runs silently (no loading flash).