Interface SLOEvaluator

All Known Implementing Classes:
InMemorySLOEvaluator

public interface SLOEvaluator
Computes the current SLOState for a given SLODefinition (issue #92).

Implementations choose their data source: the default InMemorySLOEvaluator keeps in-process counters (good for dev, tests, and small single-process deployments); a future PrometheusSLOEvaluator runs PromQL against an external store for distributed multi-process production.

Since:
0.5.0 (issue #92)
  • Method Details

    • evaluate

      SLOState evaluate(SLODefinition definition, Instant now)
      Compute the current state of definition as of now. Implementations MUST be safe for concurrent calls; an SLO dashboard may evaluate dozens of definitions in parallel.
    • evaluate

      default SLOState evaluate(SLODefinition definition)
      Convenience: evaluate as of the wall clock.