pub fn new(
        data_provider: Arc<dyn RegistryDataProvider>,
        metrics_registry: Option<&MetricsRegistry>,
    ) -> Self {
        let metrics = match metrics_registry {
            Some(metrics_registry) => Arc::new(Metrics::new(&metrics_registry)),
            None => Arc::new(Metrics::new(&MetricsRegistry::new())),
        };

        Self {
            cache: Arc::new(RwLock::new(CacheState::new())),
            data_provider,
            metrics,
            started: Arc::new(AtomicBool::new(false)),
            cancelled: Arc::new(AtomicBool::new(false)),
        }
    }
/// Creates a new instance of the RegistryClient.
Creates a new instance of the RegistryClient.
Creates a new instance of the RegistryClient .
pub fn new(
        data_provider: Arc<dyn RegistryDataProvider>,
        metrics_registry: Option<&MetricsRegistry>,
    ) -> Self {
        let metrics = match metrics_registry {
            Some(metrics_registry) => Arc::new(Metrics::new(&metrics_registry)),
            None => Arc::new(Metrics::new(&MetricsRegistry::new())),
        };
        Self {
            cache: Arc::new(RwLock::new(CacheState::new())),
            data_provider,
            metrics,
            started: Arc::new(AtomicBool::new(false)),
            cancelled: Arc::new(AtomicBool::new(false)),
        }
    }
pub fn new ( data_provider : Arc < dyn RegistryDataProvider > , metrics_registry : Option < & MetricsRegistry > , ) -> Self { let metrics = match metrics_registry { Some ( metrics_registry ) => Arc :: new ( Metrics :: new ( & metrics_registry ) ) , None => Arc :: new ( Metrics :: new ( & MetricsRegistry :: new ( ) ) ) , } ; Self { cache : Arc :: new ( RwLock :: new ( CacheState :: new ( ) ) ) , data_provider , metrics , started : Arc :: new ( AtomicBool :: new ( false ) ) , cancelled : Arc :: new ( AtomicBool :: new ( false ) ) , } }
Creates a new instance of the RegistryClient.
Creates a new instance of the RegistryClient .
data_provider
Arc<dyn RegistryDataProvider>
metrics_registry
Option<&MetricsRegistry>
data_provider
Arc<dyn RegistryDataProvider>
metrics_registry
Option<&MetricsRegistry>