#include <checker.hpp>
|
static Try< process::Owned
< Checker > > | create (const CheckInfo &check, const std::string &launcherDir, const lambda::function< void(const CheckStatusInfo &)> &callback, const TaskID &taskId, const Option< pid_t > &taskPid, const std::vector< std::string > &namespaces) |
| Attempts to create a Checker object. More...
|
|
static Try< process::Owned
< Checker > > | create (const CheckInfo &check, const std::string &launcherDir, const lambda::function< void(const CheckStatusInfo &)> &callback, const TaskID &taskId, const ContainerID &taskContainerId, const process::http::URL &agentURL, const Option< std::string > &authorizationHeader) |
| Attempts to create a Checker object. More...
|
|
mesos::internal::checks::Checker::~Checker |
( |
| ) |
|
mesos::internal::checks::Checker::Checker |
( |
const Checker & |
| ) |
|
|
delete |
static Try<process::Owned<Checker> > mesos::internal::checks::Checker::create |
( |
const CheckInfo & |
check, |
|
|
const std::string & |
launcherDir, |
|
|
const lambda::function< void(const CheckStatusInfo &)> & |
callback, |
|
|
const TaskID & |
taskId, |
|
|
const Option< pid_t > & |
taskPid, |
|
|
const std::vector< std::string > & |
namespaces |
|
) |
| |
|
static |
Attempts to create a Checker
object.
In case of success, checking starts immediately after initialization.
If the check is a COMMAND check, the checker will fork a process, enter the task's namespaces, and execute the command.
- Parameters
-
check | The protobuf message definition of a check. |
launcherDir | A directory where Mesos helper binaries are located. Executor must have access to this directory for TCP checks. |
callback | A callback Checker uses to send check 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 check. |
- Returns
- A
Checker
object or an error if create
fails.
- Todo:
- A better approach would be to return a stream of updates, e.g.,
process::Stream<CheckStatusInfo>
rather than invoking a callback.
static Try<process::Owned<Checker> > mesos::internal::checks::Checker::create |
( |
const CheckInfo & |
check, |
|
|
const std::string & |
launcherDir, |
|
|
const lambda::function< void(const CheckStatusInfo &)> & |
callback, |
|
|
const TaskID & |
taskId, |
|
|
const ContainerID & |
taskContainerId, |
|
|
const process::http::URL & |
agentURL, |
|
|
const Option< std::string > & |
authorizationHeader |
|
) |
| |
|
static |
Attempts to create a Checker
object.
In case of success, checking starts immediately after initialization.
If the check is a COMMAND check, the checker will delegate the execution of the check to the Mesos agent via the LaunchNestedContainerSession
API call.
- Parameters
-
check | The protobuf message definition of a check. |
launcherDir | A directory where Mesos helper binaries are located. Executor must have access to this directory for TCP checks. |
callback | A callback Checker uses to send check 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 checker should use to authenticate with the agent operator API. |
- Returns
- A
Checker
object or an error if create
fails.
- Todo:
- A better approach would be to return a stream of updates, e.g.,
process::Stream<CheckStatusInfo>
rather than invoking a callback.
Checker& mesos::internal::checks::Checker::operator= |
( |
const Checker & |
| ) |
|
|
delete |
void mesos::internal::checks::Checker::pause |
( |
| ) |
|
void mesos::internal::checks::Checker::resume |
( |
| ) |
|
The documentation for this class was generated from the following file: