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

25 lines
779 B
C#
Raw Normal View History

using Utils;
namespace KubernetesWorkflow
2023-04-12 11:53:55 +00:00
{
public class WorkflowCreator
{
private readonly NumberSource numberSource = new NumberSource(0);
private readonly NumberSource servicePortNumberSource = new NumberSource(30001);
private readonly KnownK8sPods knownPods = new KnownK8sPods();
private readonly K8sCluster cluster;
public WorkflowCreator(Configuration configuration)
{
cluster = new K8sCluster(configuration);
}
2023-04-12 11:53:55 +00:00
public StartupWorkflow CreateWorkflow()
{
var workflowNumberSource = new WorkflowNumberSource(numberSource.GetNextNumber(), servicePortNumberSource);
return new StartupWorkflow(workflowNumberSource, cluster, knownPods);
2023-04-12 11:53:55 +00:00
}
}
}