namespace ScadaLink.SiteRuntime;

/// <summary>
/// Configuration options for the Site Runtime component.
/// Bound from ScadaLink:SiteRuntime configuration section.
/// </summary>
public class SiteRuntimeOptions
{
    /// <summary>
    /// Number of Instance Actors to create per batch during staggered startup.
    /// Default: 20.
    /// </summary>
    public int StartupBatchSize { get; set; } = 20;

    /// <summary>
    /// Delay in milliseconds between startup batches to prevent reconnection storms.
    /// Default: 100ms.
    /// </summary>
    public int StartupBatchDelayMs { get; set; } = 100;

    /// <summary>
    /// Maximum call depth for recursive script calls (CallScript/CallShared).
    /// Default: 10.
    /// </summary>
    public int MaxScriptCallDepth { get; set; } = 10;

    /// <summary>
    /// Default script execution timeout in seconds.
    /// Default: 30 seconds.
    /// </summary>
    public int ScriptExecutionTimeoutSeconds { get; set; } = 30;

    /// <summary>
    /// Per-subscriber buffer size for the site-wide Akka stream.
    /// Slow subscribers drop oldest messages when buffer is full.
    /// Default: 1000.
    /// </summary>
    public int StreamBufferSize { get; set; } = 1000;
}
