namespace NATS.Server.Configuration;

// Maps to Go's JetStreamConfig struct in server/opts.go and server/jetstream.go.
// Controls the lifecycle parameters for the JetStream subsystem.
public sealed class JetStreamOptions
{
    /// <summary>
    /// Directory where JetStream persists stream data.
    /// Maps to Go's JetStreamConfig.StoreDir (jetstream.go:enableJetStream:430).
    /// An empty string disables file-backed persistence (memory-only mode).
    /// </summary>
    public string StoreDir { get; set; } = string.Empty;

    /// <summary>
    /// Maximum bytes of memory storage across all streams. 0 means unlimited.
    /// Maps to Go's JetStreamConfig.MaxMemory (jetstream.go:enableJetStream:471).
    /// </summary>
    public long MaxMemoryStore { get; set; }

    /// <summary>
    /// Maximum bytes of file storage across all streams. 0 means unlimited.
    /// Maps to Go's JetStreamConfig.MaxStore (jetstream.go:enableJetStream:472).
    /// </summary>
    public long MaxFileStore { get; set; }

    /// <summary>
    /// Maximum number of streams allowed. 0 means unlimited.
    /// Maps to Go's JetStreamAccountLimits.MaxStreams (jetstream.go).
    /// </summary>
    public int MaxStreams { get; set; }

    /// <summary>
    /// Maximum number of consumers allowed across all streams. 0 means unlimited.
    /// Maps to Go's JetStreamAccountLimits.MaxConsumers (jetstream.go).
    /// </summary>
    public int MaxConsumers { get; set; }
}
