Trait Instrument

Source
pub trait Instrument {
    // Required methods
    fn on_call_rejected(&self);
    fn on_open(&self);
    fn on_half_open(&self);
    fn on_closed(&self);
}
Expand description

Consumes the state machine events. May used for metrics and/or logs.

Required Methods§

Source

fn on_call_rejected(&self)

Calls when state machine reject a call.

Source

fn on_open(&self)

Calls when the circuit breaker become to open state.

Source

fn on_half_open(&self)

Calls when the circuit breaker become to half open state.

Source

fn on_closed(&self)

Calls when the circuit breaker become to closed state.

Implementations on Foreign Types§

Source§

impl Instrument for ()

An instrumentation which does noting.

Implementors§