When a routing operation involves reading values, these options allow controlling where the values are read from. By default libp2p will check local caches but may not use the network if a valid local value is found, these options allow tuning that behaviour.

interface RoutingOptions {
    onProgress?: ((evt) => void);
    signal?: AbortSignal;
    useCache?: boolean;
    useNetwork?: boolean;
}

Hierarchy (view full)

Properties

onProgress?: ((evt) => void)

Type declaration

    • (evt): void
    • Parameters

      • evt: any

      Returns void

signal?: AbortSignal
useCache?: boolean

Pass false to not use cached values

Default

true
useNetwork?: boolean

Pass false to not use the network

Default

true