namespace NATS.Server.Raft;

/// <summary>
/// General raft entry shape (type + payload) used by proposal/state paths.
/// Go reference: raft.go Entry.
/// </summary>
public readonly record struct RaftEntry(RaftEntryType Type, byte[] Data)
{
    public RaftEntryWire ToWire() => new(Type, Data);

    public static RaftEntry FromWire(RaftEntryWire wire) => new(wire.Type, wire.Data);
}
