#include <plugin_metric_collector.h>
Factory for creating standard collector plugins
Definition at line 245 of file plugin_metric_collector.h.
◆ create()
| static std::unique_ptr< metric_collector_plugin > kcenon::monitoring::plugin_factory::create |
( |
const std::string & | type, |
|
|
const std::unordered_map< std::string, std::string > & | config = {} ) |
|
static |
Create a plugin by type name
- Parameters
-
| type | Plugin type name |
| config | Plugin configuration |
- Returns
- Plugin instance or nullptr if type not found
◆ create_logger_system_collector()
| static std::unique_ptr< metric_collector_plugin > kcenon::monitoring::plugin_factory::create_logger_system_collector |
( |
const std::unordered_map< std::string, std::string > & | config = {} | ) |
|
|
static |
Create a logger system collector plugin
- Parameters
-
| config | Plugin configuration |
- Returns
- Logger system collector instance
◆ create_system_resource_collector()
| static std::unique_ptr< metric_collector_plugin > kcenon::monitoring::plugin_factory::create_system_resource_collector |
( |
const std::unordered_map< std::string, std::string > & | config = {} | ) |
|
|
static |
Create a system resource collector plugin
- Parameters
-
| config | Plugin configuration |
- Returns
- System resource collector instance
◆ create_thread_system_collector()
| static std::unique_ptr< metric_collector_plugin > kcenon::monitoring::plugin_factory::create_thread_system_collector |
( |
const std::unordered_map< std::string, std::string > & | config = {} | ) |
|
|
static |
Create a thread system collector plugin
- Parameters
-
| config | Plugin configuration |
- Returns
- Thread system collector instance
◆ register_factory()
| static void kcenon::monitoring::plugin_factory::register_factory |
( |
const std::string & | type, |
|
|
std::function< std::unique_ptr< metric_collector_plugin >(const std::unordered_map< std::string, std::string > &)> | factory ) |
|
static |
Register a custom plugin factory
- Parameters
-
| type | Plugin type name |
| factory | Factory function |
◆ factories_
| std::unordered_map< std::string, std::function<std::unique_ptr<metric_collector_plugin>(const std::unordered_map<std::string, std::string>&)> > kcenon::monitoring::plugin_factory::factories_ |
|
staticprivate |
◆ factories_mutex_
| std::mutex kcenon::monitoring::plugin_factory::factories_mutex_ |
|
staticprivate |
The documentation for this class was generated from the following file: