pub struct BosunClient {
    pub host: String,
    pub timeout: u64,
}
Expand description

Encapsulates Bosun server connection.

Fields

host: String

<HOSTNAME|IP ADDR>:<PORT>

timeout: u64

Timeout for http request connection

Implementations

Creates a new BosunClient.

Sends metric meta data to Bosun server.

Example
let metadata = Metadata::new("lukas.tests.count", "counter", "Tests", "Amount of Lukas Tests");

let client = BosunClient::new("localhost:8070", 5);
let _ = client.emit_metadata(&metadata);

Sends metric datum to Bosun server.

Example
let mut tags = Tags::new();
tags.insert("host".to_string(), "test-vm".to_string());
let datum = Datum::new("lukas.tests.count", 1458066838, "1", &tags);

let client = BosunClient::new("localhost:8070", 5);
let _ = client.emit_datum(&datum);

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.