using System.ComponentModel.DataAnnotations;
namespace StellaOps.Zastava.Observer.Configuration;
///
/// Configuration for emitting runtime reachability facts to Signals.
///
public sealed class ReachabilityRuntimeOptions
{
///
/// Enables runtime reachability fact publishing when true.
///
public bool Enabled { get; set; }
///
/// Signals endpoint that accepts runtime facts (JSON or NDJSON).
///
[Required(AllowEmptyStrings = false)]
public string Endpoint { get; set; } = "https://signals.internal/signals/runtime-facts";
///
/// Required callgraph identifier used to correlate runtime facts with static graphs.
///
[Required(AllowEmptyStrings = false)]
public string CallgraphId { get; set; } = string.Empty;
///
/// Optional analysis identifier forwarded as X-Analysis-Id.
///
public string? AnalysisId { get; set; }
///
/// Maximum number of facts sent in a single publish attempt.
///
[Range(1, 5000)]
public int BatchSize { get; set; } = 1000;
///
/// Maximum delay (seconds) before flushing a partially filled batch.
///
[Range(typeof(double), "0.1", "30")]
public double FlushIntervalSeconds { get; set; } = 2;
///
/// Optional subject fallback when image data is missing.
///
public string? SubjectScanId { get; set; }
public string? SubjectImageDigest { get; set; }
public string? SubjectComponent { get; set; }
public string? SubjectVersion { get; set; }
}