33 lines
1.2 KiB
C#
Raw Normal View History

using KubernetesWorkflow;
2023-09-08 09:39:56 +02:00
using Utils;
2023-04-13 09:33:10 +02:00
namespace CodexPlugin
2023-04-12 13:53:55 +02:00
{
public class CodexStartupConfig
{
public string? NameOverride { get; set; }
2023-09-25 08:47:19 +02:00
public ILocation Location { get; set; } = KnownLocations.UnspecifiedLocation;
public CodexLogLevel LogLevel { get; set; }
public string[]? LogTopics { get; set; }
2023-04-12 13:53:55 +02:00
public ByteSize? StorageQuota { get; set; }
2023-09-13 11:59:21 +02:00
public bool MetricsEnabled { get; set; }
2023-09-19 10:24:43 +02:00
public MarketplaceInitialConfig? MarketplaceConfig { get; set; }
public string? BootstrapSpr { get; set; }
public int? BlockTTL { get; set; }
public uint? SimulateProofFailures { get; set; }
public bool? EnableValidator { get; set; }
public TimeSpan? BlockMaintenanceInterval { get; set; }
public int? BlockMaintenanceNumber { get; set; }
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-12 13:53:55 +02:00
}
}