This can be used as a superclass for a concrete SloEvaluator implementation.

This class evaluates the SLO in a three step process:

  1. onBeforeEvaluateSlo(key, slo), which may return a context object.
  2. slo.evaluate()
  3. onAfterEvaluateSlo(currContext, sloOutput)

Hierarchy

Constructors

Methods

  • Executes the specified SLO and applies its output to the orchestrator.

    If this returns an observable, it is possible to cancel the evaluation of the SLO by unsubscribing from the observable (e.g., after a timeout).

    Parameters

    Returns Observable<void>

    An observable that emits and completes or a Promise that resolves when the evaluation of the SLO has finished and its output has been applied to the orchestrator if necessary.

  • This method is called after the SLO has been evaluated. It is responsible for applying the output to the orchestrator if necessary.

    Parameters

    • key: string

      The key used to uniquely identify the SLO within the cluster.

    • currContext: never

      The context object that was created by onBeforeEvaluateSlo().

    • sloOutput: SloOutput<any>

      The output that slo.evaluate() has resolved to.

    Returns Promise<void>

    An observable or a Promise that emits/resolves when SLO output has been applied to the orchestrator if necessary.

    Note

    Normally, the ServiceLevelObjective is not needed by this method. If a specific implementation does require the ServiceLevelObjective instance, it can be packed into the context object in onBeforeEvaluateSlo().

Generated using TypeDoc