46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
namespace NATS.Server.Raft;
|
|
|
|
/// <summary>
|
|
/// RAFT runtime configuration model aligned with Go's raftConfig shape.
|
|
/// Go reference: server/raft.go raftConfig (Name, Store, Log, Track, Observer,
|
|
/// Recovering, ScaleUp).
|
|
/// </summary>
|
|
public sealed class RaftConfig
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the logical name for this RAFT group (meta, stream, or consumer group id).
|
|
/// </summary>
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
// Store/log abstractions are intentionally loose until full WAL/store parity is wired.
|
|
/// <summary>
|
|
/// Gets or sets the storage backend that persists RAFT snapshots and stable state.
|
|
/// </summary>
|
|
public object? Store { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the write-ahead log implementation used for replicated entries.
|
|
/// </summary>
|
|
public object? Log { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether this node tracks replication progress metrics.
|
|
/// </summary>
|
|
public bool Track { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether this node is a non-voting observer.
|
|
/// </summary>
|
|
public bool Observer { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether the group is replaying log state during recovery.
|
|
/// </summary>
|
|
public bool Recovering { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether this node is participating in a membership scale-up.
|
|
/// </summary>
|
|
public bool ScaleUp { get; set; }
|
|
}
|