cs-codex-dist-tests/MetricsPlugin/MetricsPlugin.cs

33 lines
716 B
C#
Raw Normal View History

2023-09-13 07:12:18 +00:00
using Core;
using KubernetesWorkflow;
namespace MetricsPlugin
{
public class MetricsPlugin : IProjectPlugin
{
private readonly IPluginTools tools;
private readonly PrometheusStarter starter;
public MetricsPlugin(IPluginTools tools)
{
this.tools = tools;
starter = new PrometheusStarter(tools);
}
2023-09-13 07:12:18 +00:00
2023-09-13 08:03:11 +00:00
public void Announce()
2023-09-13 07:12:18 +00:00
{
2023-09-13 08:03:11 +00:00
//log.Log("Hi from the metrics plugin.");
2023-09-13 07:12:18 +00:00
}
2023-09-13 08:03:11 +00:00
public void Decommission()
2023-09-13 07:12:18 +00:00
{
}
public RunningContainers StartMetricsCollector(RunningContainers[] scrapeTargets)
2023-09-13 07:12:18 +00:00
{
return starter.CollectMetricsFor(scrapeTargets);
2023-09-13 07:12:18 +00:00
}
}
}