The isEqual method should return true only when both metrics are equal.
This method is optional, it is only used for optimization purposes.
The trackFailure method updates the metrics when failure occurs. The metrics will be used whenClosed and whenHalfOpen methods.
The trackSuccess method updates the metrics when success occurs.
The whenClosed method should use currentMetrics and if needed currentDate to transition to open state or stay in closed state.
The whenHalfOpened method should use currentMetrics and if needed currentDate to transition to open state, closed state or stay in half open state.
IMPORT_PATH:
"@daiso-tech/core/circuit-breaker/policies"