pub fn new_insecure(
        rt_handle: tokio::runtime::Handle,
        config: Config,
        metrics_registry: MetricsRegistry,
        log: &slog::Logger,
    ) -> Self {
        let log = log.new(slog::o!("Application" => "MetricsRuntime"));

        let metrics = Self {
            rt_handle,
            config,
            metrics_registry,
            crypto_tls: None,
            log,
        };

        match metrics.config.exporter {
            Exporter::Http(socket_addr) => metrics.start_http(socket_addr),
            Exporter::Log => metrics.start_log(),
            Exporter::File(_) => {}
        };

        metrics
    }
/// Create a MetricsRuntimeImpl supporting only HTTP for insecure use cases
/// e.g. testing binaries where the node certificate may not be available.
Create a MetricsRuntimeImpl supporting only HTTP for insecure use cases
e.g. testing binaries where the node certificate may not be available.
Create a MetricsRuntimeImpl supporting only HTTP for insecure use cases e . g . testing binaries where the node certificate may not be available .
pub fn new_insecure(
        rt_handle: tokio::runtime::Handle,
        config: Config,
        metrics_registry: MetricsRegistry,
        log: &slog::Logger,
    ) -> Self {
        let log = log.new(slog::o!("Application" => "MetricsRuntime"));
        let metrics = Self {
            rt_handle,
            config,
            metrics_registry,
            crypto_tls: None,
            log,
        };
        match metrics.config.exporter {
            Exporter::Http(socket_addr) => metrics.start_http(socket_addr),
            Exporter::Log => metrics.start_log(),
            Exporter::File(_) => {}
        };
        metrics
    }
pub fn new_insecure ( rt_handle : tokio :: runtime :: Handle , config : Config , metrics_registry : MetricsRegistry , log : & slog :: Logger , ) -> Self { let log = log . new ( slog :: o ! ( " " " " ) ) ; let metrics = Self { rt_handle , config , metrics_registry , crypto_tls : None , log , } ; match metrics . config . exporter { Exporter :: Http ( socket_addr ) => metrics . start_http ( socket_addr ) , Exporter :: Log => metrics . start_log ( ) , Exporter :: File ( _ ) => { } } ; metrics }
Create a MetricsRuntimeImpl supporting only HTTP for insecure use cases
e.g.
Create a MetricsRuntimeImpl supporting only HTTP for insecure use cases e . g .
rt_handle
tokio::runtime::Handle
config
Config
metrics_registry
MetricsRegistry
log
&slog::Logger
rt_handle
tokio::runtime::Handle
config
Config
metrics_registry
MetricsRegistry
log
&slog::Logger