Configuration options for the DependencyMonitor. For information on how cache duration and refresh threshold work together, see cache-manager
// monitor with default optionsconst monitor = new DependencyMonitor(); Copy
// monitor with default optionsconst monitor = new DependencyMonitor();
// monitor with custom optionsconst options: DependencyMonitorOptions = { cacheDurationMs: 30000, // override cache duration of 30 seconds refreshThresholdMs: 2000, // override refresh threshold of 2 seconds checkIntervalMs: 10000, // override check interval of 10 seconds};const monitor = new DependencyMonitor(options);monitor.startDependencyCheckInterval(); Copy
// monitor with custom optionsconst options: DependencyMonitorOptions = { cacheDurationMs: 30000, // override cache duration of 30 seconds refreshThresholdMs: 2000, // override refresh threshold of 2 seconds checkIntervalMs: 10000, // override check interval of 10 seconds};const monitor = new DependencyMonitor(options);monitor.startDependencyCheckInterval();
Optional
Optional cache duration in milliseconds.
60000 Copy
60000
Optional interval for running dependency checks in milliseconds.
15000 Copy
15000
Optional refresh threshold in milliseconds.
5000 Copy
5000
Configuration options for the DependencyMonitor. For information on how cache duration and refresh threshold work together, see cache-manager
Example
Example