Apache Mesos
Public Member Functions | Static Public Member Functions | List of all members
mesos::internal::checks::HealthChecker Class Reference

#include <health_checker.hpp>

Public Member Functions

 ~HealthChecker ()
 
void pause ()
 
void resume ()
 

Static Public Member Functions

static Try< process::Owned< HealthChecker > > create (const HealthCheck &healthCheck, const std::string &launcherDir, const lambda::function< void(const TaskHealthStatus &)> &callback, const TaskID &taskId, Variant< runtime::Plain, runtime::Docker, runtime::Nested > runtime)
 Attempts to create a HealthChecker object. More...
 

Constructor & Destructor Documentation

mesos::internal::checks::HealthChecker::~HealthChecker ( )

Member Function Documentation

static Try<process::Owned<HealthChecker> > mesos::internal::checks::HealthChecker::create ( const HealthCheck &  healthCheck,
const std::string &  launcherDir,
const lambda::function< void(const TaskHealthStatus &)> &  callback,
const TaskID &  taskId,
Variant< runtime::Plain, runtime::Docker, runtime::Nested runtime 
)
static

Attempts to create a HealthChecker object.

In case of success, health checking starts immediately after initialization.

The check performed is based off the check type and the given runtime.

Parameters
healthCheckThe protobuf message definition of health check.
launcherDirA directory where Mesos helper binaries are located.
callbackA callback HealthChecker uses to send health status updates to its owner (usually an executor).
taskIdThe TaskID of the target task.
runtimeThe runtime that launched the task.
Returns
A HealthChecker object or an error if create fails.
Todo:
A better approach would be to return a stream of updates, e.g., process::Stream<TaskHealthStatus> rather than invoking a callback.
Todo:
Consider leveraging checks::Checker for checking functionality. This class will then focus on interpreting and acting on the result.
void mesos::internal::checks::HealthChecker::pause ( )
void mesos::internal::checks::HealthChecker::resume ( )

The documentation for this class was generated from the following file: