Struct bosun_emitter::BosunClient [] [src]

pub struct BosunClient {
    pub host: String,
}

Encapsulates Bosun server connection.

Fields

<HOSTNAME|IP ADDR>:<PORT>

Methods

impl BosunClient
[src]

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");
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");
let _ = client.emit_datum(&datum);

Trait Implementations

impl Debug for BosunClient
[src]

Formats the value using the given formatter.