pub trait Configuration {
    // Required methods
    fn to_addr(&self) -> &str;
    fn from_addr(&self) -> &str;
    fn namespace(&self) -> &str;
    fn default_tags(&self) -> Vec<String>;
    fn socket_path(&self) -> Option<String>;
    fn batching_options(&self) -> Option<BatchingOptions>;

    // Provided method
    fn take_tracker_config(&mut self) -> TagTrackerConfiguration { ... }
}
Expand description

A trait representing a valid configuration entity

Required Methods§

source

fn to_addr(&self) -> &str

The address of the udp socket we’ll bind to for sending

source

fn from_addr(&self) -> &str

The address of the udp socket we’ll send metrics and events to

source

fn namespace(&self) -> &str

A namespace to prefix all metrics with, joined with a ‘.’.

source

fn default_tags(&self) -> Vec<String>

Default tags to be sent with every metric reporting

source

fn socket_path(&self) -> Option<String>

if defined, will use UDS instead of UDP and will ignore UDP options

source

fn batching_options(&self) -> Option<BatchingOptions>

if defined, will utilize batching for sending metrics

Provided Methods§

source

fn take_tracker_config(&mut self) -> TagTrackerConfiguration

Get the tag tracker configuration, and reset it to default. See TagTrackerConfiguration

Implementations on Foreign Types§

source§

impl Configuration for Options

Implementors§