2023-04-14 10:51:35 +02:00
|
|
|
|
using DistTestCore.Marketplace;
|
2023-08-13 09:07:23 +02:00
|
|
|
|
using DistTestCore.Metrics;
|
2023-04-14 10:51:35 +02:00
|
|
|
|
using KubernetesWorkflow;
|
2023-09-08 09:39:56 +02:00
|
|
|
|
using Utils;
|
2023-04-13 09:33:10 +02:00
|
|
|
|
|
|
|
|
|
namespace DistTestCore.Codex
|
2023-04-12 13:53:55 +02:00
|
|
|
|
{
|
|
|
|
|
public class CodexStartupConfig
|
|
|
|
|
{
|
2023-05-31 13:34:12 +02:00
|
|
|
|
public CodexStartupConfig(CodexLogLevel logLevel)
|
|
|
|
|
{
|
|
|
|
|
LogLevel = logLevel;
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-14 15:04:37 +10:00
|
|
|
|
public string LogLevelWithTopics()
|
|
|
|
|
{
|
|
|
|
|
var level = LogLevel.ToString()!.ToUpperInvariant();
|
|
|
|
|
if (LogTopics != null && LogTopics.Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
level = $"INFO;{level}: {string.Join(",", LogTopics.Where(s => !string.IsNullOrEmpty(s)))}";
|
|
|
|
|
}
|
|
|
|
|
return level;
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-30 10:56:19 +02:00
|
|
|
|
public string? NameOverride { get; set; }
|
2023-04-12 13:53:55 +02:00
|
|
|
|
public Location Location { get; set; }
|
2023-09-14 15:02:53 +10:00
|
|
|
|
public CodexLogLevel LogLevel { get; set; }
|
2023-09-14 15:03:09 +10:00
|
|
|
|
public string[]? LogTopics { get; set; }
|
2023-04-12 13:53:55 +02:00
|
|
|
|
public ByteSize? StorageQuota { get; set; }
|
2023-08-13 09:07:23 +02:00
|
|
|
|
public MetricsMode MetricsMode { get; set; }
|
2023-04-14 10:51:35 +02:00
|
|
|
|
public MarketplaceInitialConfig? MarketplaceConfig { get; set; }
|
2023-04-24 14:09:23 +02:00
|
|
|
|
public string? BootstrapSpr { get; set; }
|
2023-06-29 16:03:45 +02:00
|
|
|
|
public int? BlockTTL { get; set; }
|
2023-09-14 15:02:53 +10:00
|
|
|
|
public uint? SimulateProofFailures { get; set; }
|
|
|
|
|
public bool? EnableValidator { get; set; }
|
2023-08-14 15:51:03 +02:00
|
|
|
|
public TimeSpan? BlockMaintenanceInterval { get; set; }
|
2023-08-14 16:37:31 +02:00
|
|
|
|
public int? BlockMaintenanceNumber { get; set; }
|
2023-04-12 13:53:55 +02:00
|
|
|
|
}
|
|
|
|
|
}
|