152 virtual auto name() const -> std::string_view = 0;
177 virtual auto
interval() const -> std::chrono::milliseconds = 0;
207 .requires_platform_support =
false
Pure virtual interface for metric collector plugins.
virtual auto get_metric_types() const -> std::vector< std::string >=0
Get supported metric types.
virtual auto get_statistics() const -> stats_map
Get plugin statistics.
virtual auto initialize(const config_map &) -> bool
Initialize plugin with configuration.
virtual auto interval() const -> std::chrono::milliseconds=0
Get the collection interval for this plugin.
virtual auto collect() -> std::vector< metric >=0
Collect current metrics from this plugin.
virtual void shutdown()
Shutdown plugin and release resources.
virtual auto is_available() const -> bool=0
Check if this plugin is available on the current system.
virtual auto get_metadata() const -> plugin_metadata
Get plugin metadata.
virtual auto name() const -> std::string_view=0
Get the unique name of this plugin.
virtual ~collector_plugin()=default
CRTP base class for metric collectors.
Adapter for metric types to support interface definitions.
std::unordered_map< std::string, double > stats_map
Type alias for statistics map.
std::unique_ptr< collector_plugin >(*)() plugin_factory_fn
Type alias for plugin factory function.
plugin_category
Categorization of collector plugins.
@ hardware
Hardware sensors (GPU, temperature, battery, power)
@ system
System integration (threads, loggers, containers)
@ custom
User-defined plugins.
@ network
Network metrics (connectivity, bandwidth)
std::unordered_map< std::string, std::string > config_map
Type alias for configuration map.
@ platform
Platform/system power domain.
Basic metric structure for interface compatibility.