#include <health_checker.hpp>
|
static Try< process::Owned
< HealthChecker > > | create (const HealthCheck &healthCheck, const std::string &launcherDir, const lambda::function< void(const TaskHealthStatus &)> &callback, const TaskID &taskId, const Option< pid_t > &taskPid, const std::vector< std::string > &namespaces) |
| Attempts to create a HealthChecker object. More...
|
|
static Try< process::Owned
< HealthChecker > > | create (const HealthCheck &healthCheck, const std::string &launcherDir, const lambda::function< void(const TaskHealthStatus &)> &callback, const TaskID &taskId, const ContainerID &taskContainerId, const process::http::URL &agentURL, const Option< std::string > &authorizationHeader) |
| Attempts to create a HealthChecker object. More...
|
|
mesos::internal::checks::HealthChecker::~HealthChecker |
( |
| ) |
|
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, |
|
|
const Option< pid_t > & |
taskPid, |
|
|
const std::vector< std::string > & |
namespaces |
|
) |
| |
|
static |
Attempts to create a HealthChecker
object.
In case of success, health checking starts immediately after initialization.
If the check is a command health check, the checker will fork a process, enter the task's namespaces, and execute the command.
- Parameters
-
healthCheck | The protobuf message definition of health check. |
launcherDir | A directory where Mesos helper binaries are located. |
callback | A callback HealthChecker uses to send health status updates to its owner (usually an executor). |
taskId | The TaskID of the target task. |
taskPid | The target task's pid used to enter the specified namespaces. |
namespaces | The namespaces to enter prior to performing the health check. |
- 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.
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, |
|
|
const ContainerID & |
taskContainerId, |
|
|
const process::http::URL & |
agentURL, |
|
|
const Option< std::string > & |
authorizationHeader |
|
) |
| |
|
static |
Attempts to create a HealthChecker
object.
In case of success, health checking starts immediately after initialization.
If the check is a command health check, the checker will delegate the execution of the check to the Mesos agent via the LaunchNestedContainerSession
API call.
- Parameters
-
healthCheck | The protobuf message definition of health check. |
launcherDir | A directory where Mesos helper binaries are located. |
callback | A callback HealthChecker uses to send health status updates to its owner (usually an executor). |
taskId | The TaskID of the target task. |
taskContainerId | The ContainerID of the target task. |
agentURL | The URL of the agent. |
authorizationHeader | The authorization header the health checker should use to authenticate with the agent operator API. |
- 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.
void mesos::internal::checks::HealthChecker::pause |
( |
| ) |
|
void mesos::internal::checks::HealthChecker::resume |
( |
| ) |
|
The documentation for this class was generated from the following file: