Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::prometheus::AnyBool< ImplType > Class Template Reference

A wrapped to provide bool interface for a Prometheus metric. More...

#include <Bool.hpp>

Public Member Functions

 AnyBool (ImplType &impl)
 Construct a bool metric.
 
AnyBooloperator= (bool value)
 Set the value of the bool metric.
 
 operator bool () const
 Get the value of the bool metric.
 

Detailed Description

template<SomeBoolImpl ImplType>
class util::prometheus::AnyBool< ImplType >

A wrapped to provide bool interface for a Prometheus metric.

Note
Prometheus does not have a native bool type, so we use a counter with a value of 0 or 1

Constructor & Destructor Documentation

◆ AnyBool()

template<SomeBoolImpl ImplType>
util::prometheus::AnyBool< ImplType >::AnyBool ( ImplType & impl)
inlineexplicit

Construct a bool metric.

Parameters
implThe implementation of the metric

Member Function Documentation

◆ operator bool()

template<SomeBoolImpl ImplType>
util::prometheus::AnyBool< ImplType >::operator bool ( ) const
inline

Get the value of the bool metric.

Returns
The value of the metric

◆ operator=()

template<SomeBoolImpl ImplType>
AnyBool & util::prometheus::AnyBool< ImplType >::operator= ( bool value)
inline

Set the value of the bool metric.

Parameters
valueThe value to set
Returns
A reference to the metric

The documentation for this class was generated from the following file: