2023-09-13 09:25:08 +00:00
|
|
|
|
using KubernetesWorkflow;
|
|
|
|
|
|
|
|
|
|
namespace MetricsPlugin
|
|
|
|
|
{
|
|
|
|
|
public interface IMetricsScrapeTarget
|
|
|
|
|
{
|
2023-11-06 14:27:23 +00:00
|
|
|
|
RunningContainer Container { get; }
|
|
|
|
|
string MetricsPortTag { get; }
|
2023-09-13 09:25:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-09-19 09:51:59 +00:00
|
|
|
|
public interface IHasMetricsScrapeTarget
|
|
|
|
|
{
|
|
|
|
|
IMetricsScrapeTarget MetricsScrapeTarget { get; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public interface IHasManyMetricScrapeTargets
|
2023-09-13 09:59:21 +00:00
|
|
|
|
{
|
|
|
|
|
IMetricsScrapeTarget[] ScrapeTargets { get; }
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-13 09:25:08 +00:00
|
|
|
|
public class MetricsScrapeTarget : IMetricsScrapeTarget
|
|
|
|
|
{
|
2023-11-06 14:27:23 +00:00
|
|
|
|
public MetricsScrapeTarget(RunningContainer container, string metricsPortTag)
|
2023-09-13 09:25:08 +00:00
|
|
|
|
{
|
2023-11-06 14:27:23 +00:00
|
|
|
|
Container = container;
|
|
|
|
|
MetricsPortTag = metricsPortTag;
|
2023-09-13 09:25:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-11-06 14:27:23 +00:00
|
|
|
|
public RunningContainer Container { get; }
|
|
|
|
|
public string MetricsPortTag { get; }
|
2023-09-13 09:25:08 +00:00
|
|
|
|
}
|
|
|
|
|
}
|