Files
git.stella-ops.org/src/StellaOps.Scheduler.Storage.Mongo/Options/SchedulerMongoOptions.cs

35 lines
1.1 KiB
C#

using System;
namespace StellaOps.Scheduler.Storage.Mongo.Options;
/// <summary>
/// Configures MongoDB connectivity and collection names for Scheduler storage.
/// </summary>
public sealed class SchedulerMongoOptions
{
public string ConnectionString { get; set; } = "mongodb://localhost:27017";
public string Database { get; set; } = "stellaops_scheduler";
public string SchedulesCollection { get; set; } = "schedules";
public string RunsCollection { get; set; } = "runs";
public string ImpactSnapshotsCollection { get; set; } = "impact_snapshots";
public string AuditCollection { get; set; } = "audit";
public string LocksCollection { get; set; } = "locks";
public string MigrationsCollection { get; set; } = "_scheduler_migrations";
/// <summary>
/// Optional TTL applied to completed runs. When zero or negative no TTL index is created.
/// </summary>
public TimeSpan CompletedRunRetention { get; set; } = TimeSpan.FromDays(180);
public bool UseMajorityReadConcern { get; set; } = true;
public bool UseMajorityWriteConcern { get; set; } = true;
}