template<typename Detector>
struct resilient::StatelessDetector< Detector >
An helper base detector to simplify writing stateless detectors.
It uses the CRT pattern to define the Detector concept, calling the derived Detector detect()
method to detect failures.
The detectors which derive from the StatelessDetector
need only to define a detect()
function which takes the ICallResult
.
How to use it
struct MyStatelessDetector : FailureDetectorTag<MyFailure>,
StatelessDetector<MyStatelessDetector>
{
auto detect(ICallResult<T>& result)
{
...
}
}
- Template Parameters
-
Detector | The type of the detector |