cs-codex-dist-tests/KubernetesWorkflow/RunningContainers.cs

41 lines
1.1 KiB
C#
Raw Normal View History

2023-04-12 11:53:55 +00:00
namespace KubernetesWorkflow
{
public class RunningContainers
{
public RunningContainers(StartupConfig startupConfig, RunningPod runningPod, RunningContainer[] containers)
{
StartupConfig = startupConfig;
RunningPod = runningPod;
Containers = containers;
}
public StartupConfig StartupConfig { get; }
public RunningPod RunningPod { get; }
public RunningContainer[] Containers { get; }
2023-04-13 12:36:17 +00:00
public string Describe()
{
2023-04-19 12:57:00 +00:00
return string.Join(",", Containers.Select(c => c.GetName()));
2023-04-13 12:36:17 +00:00
}
2023-04-12 11:53:55 +00:00
}
public class RunningContainer
{
public RunningContainer(RunningPod pod, ContainerRecipe recipe, Port[] servicePorts)
{
Pod = pod;
Recipe = recipe;
ServicePorts = servicePorts;
}
2023-04-19 07:57:37 +00:00
public string GetName()
{
return $"<{Recipe.Name}>";
}
2023-04-12 11:53:55 +00:00
public RunningPod Pod { get; }
public ContainerRecipe Recipe { get; }
public Port[] ServicePorts { get; }
}
}