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).
The key used to identify the SLO.
The ServiceLevelObjective
that should be evaluated.
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.
The key used to uniquely identify the SLO within the cluster.
The context object that was created by onBeforeEvaluateSlo()
.
The output that slo.evaluate()
has resolved to.
An observable or a Promise that emits/resolves when SLO output has been applied to the orchestrator if necessary.
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()
.
This method is called before an SLO is evaluated. It may be used to do pre-processing, etc.
The key used to uniquely identify the SLO within the cluster.
The ServiceLevelObjective
that should be evaluated.
An observable that emits or a Promise that resolves to an optional context object that will be passed
to onAfterEvaluateSlo()
.
Generated using TypeDoc
This can be used as a superclass for a concrete
SloEvaluator
implementation.This class evaluates the SLO in a three step process:
onBeforeEvaluateSlo(key, slo)
, which may return a context object.slo.evaluate()
onAfterEvaluateSlo(currContext, sloOutput)