cs-codex-dist-tests/CodexPlugin/CodexPlugin.cs

42 lines
1.0 KiB
C#
Raw Normal View History

2023-09-12 11:32:06 +00:00
using Core;
2023-09-11 14:57:57 +00:00
using KubernetesWorkflow;
2023-09-12 08:31:55 +00:00
using Logging;
2023-09-11 14:57:57 +00:00
namespace CodexPlugin
{
2023-09-12 09:25:04 +00:00
public class CodexPlugin : IProjectPlugin
2023-09-11 14:57:57 +00:00
{
2023-09-12 08:31:55 +00:00
private CodexStarter codexStarter = null!;
2023-09-11 14:57:57 +00:00
2023-09-12 08:31:55 +00:00
#region IProjectPlugin Implementation
public void Announce(ILog log)
2023-09-11 14:57:57 +00:00
{
2023-09-12 08:31:55 +00:00
log.Log("hello from codex plugin. codex container info here.");
}
public void Initialize(IPluginTools tools)
{
codexStarter = new CodexStarter(tools);
2023-09-11 14:57:57 +00:00
}
2023-09-12 08:31:55 +00:00
public void Finalize(ILog log)
{
}
#endregion
2023-09-11 14:57:57 +00:00
public RunningContainers[] StartCodexNodes(int numberOfNodes, Action<ICodexSetup> setup)
{
var codexSetup = new CodexSetup(numberOfNodes, CodexLogLevel.Trace);
setup(codexSetup);
return codexStarter.BringOnline(codexSetup);
}
public ICodexNodeGroup WrapCodexContainers(RunningContainers[] containers)
{
return codexStarter.WrapCodexContainers(containers);
}
}
}