Github   Telegram
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
components::StatisticsStorage Class Referencefinal

Component that keeps a utils::statistics::Storage storage for metrics. More...

#include <userver/components/statistics_storage.hpp>

+ Inheritance diagram for components::StatisticsStorage:
+ Collaboration diagram for components::StatisticsStorage:

Public Member Functions

 StatisticsStorage (const ComponentConfig &config, const ComponentContext &context)
 
void OnAllComponentsLoaded () override
 
utils::statistics::StorageGetStorage ()
 
const utils::statistics::StorageGetStorage () const
 
utils::statistics::MetricsStoragePtr GetMetricsStorage ()
 
- Public Member Functions inherited from components::LoggableComponentBase
 LoggableComponentBase (const ComponentConfig &, const ComponentContext &)
 
 LoggableComponentBase (LoggableComponentBase &&)=delete
 
 LoggableComponentBase (const LoggableComponentBase &)=delete
 
 ~LoggableComponentBase () override=default
 
ComponentHealth GetComponentHealth () const override
 
void OnLoadingCancelled () override
 
void OnAllComponentsLoaded () override
 
void OnAllComponentsAreStopping () override
 

Static Public Member Functions

static yaml_config::Schema GetStaticConfigSchema ()
 
- Static Public Member Functions inherited from components::LoggableComponentBase
static yaml_config::Schema GetStaticConfigSchema ()
 

Static Public Attributes

static constexpr auto kName = "statistics-storage"
 

Detailed Description

Component that keeps a utils::statistics::Storage storage for metrics.

Returned references to utils::statistics::Storage live for a lifetime of the component and are safe for concurrent use.

The component does not have any options for service config.

Static configuration example:

# yaml
statistics-storage:
# Nothing
Examples
samples/testsuite-support/src/metrics.cpp.

Definition at line 31 of file statistics_storage.hpp.

Member Function Documentation

◆ GetMetricsStorage()

utils::statistics::MetricsStoragePtr components::StatisticsStorage::GetMetricsStorage ( )
inline

◆ GetStorage() [1/2]

utils::statistics::Storage & components::StatisticsStorage::GetStorage ( )
inline

Definition at line 42 of file statistics_storage.hpp.

◆ GetStorage() [2/2]

const utils::statistics::Storage & components::StatisticsStorage::GetStorage ( ) const
inline

Definition at line 44 of file statistics_storage.hpp.

Member Data Documentation

◆ kName

constexpr auto components::StatisticsStorage::kName = "statistics-storage"
staticconstexpr

Definition at line 33 of file statistics_storage.hpp.


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