Apache Mesos
|
#include <checker_process.hpp>
Public Member Functions | |
CheckerProcess (const CheckInfo &_check, const std::string &_launcherDir, const lambda::function< void(const Try< CheckStatusInfo > &)> &_callback, const TaskID &_taskId, const Option< pid_t > &_taskPid, const std::vector< std::string > &_namespaces, const Option< ContainerID > &_taskContainerId, const Option< process::http::URL > &_agentURL, const Option< std::string > &_authorizationHeader, const Option< std::string > &_scheme, const std::string &_name, bool _commandCheckViaAgent, bool _ipv6=false) | |
void | pause () |
void | resume () |
virtual | ~CheckerProcess () |
![]() | |
virtual | ~ProtobufProcess () |
![]() | |
virtual | ~Process () |
PID< CheckerProcess > | self () const |
Returns the PID of the process. More... | |
![]() | |
ProcessBase (const std::string &id="") | |
virtual | ~ProcessBase () |
const UPID & | self () const |
![]() | |
virtual | ~EventConsumer () |
Protected Member Functions | |
void | initialize () override |
Invoked when a process gets spawned. More... | |
void | finalize () override |
Invoked when a process is terminated. More... | |
![]() | |
void | consume (process::MessageEvent &&event) override |
void | send (const process::UPID &to, const google::protobuf::Message &message) |
void | reply (const google::protobuf::Message &message) |
void | install (void(CheckerProcess::*method)(const process::UPID &, const M &)) |
void | install (void(CheckerProcess::*method)(const process::UPID &, M &&)) |
void | install (void(CheckerProcess::*method)(const process::UPID &)) |
void | install (void(CheckerProcess::*method)(const process::UPID &, PC...), MessageProperty< M, P >...param) |
void | install (void(CheckerProcess::*method)(const M &)) |
void | install (void(CheckerProcess::*method)(M &&)) |
void | install (void(CheckerProcess::*method)()) |
void | install (void(CheckerProcess::*method)(PC...), MessageProperty< M, P >...param) |
![]() | |
virtual void | serve (Event &&event) |
Invoked when an event is serviced. More... | |
void | consume (DispatchEvent &&event) override |
void | consume (HttpEvent &&event) override |
void | consume (ExitedEvent &&event) override |
void | consume (TerminateEvent &&event) override |
virtual void | exited (const UPID &) |
Invoked when a linked process has exited. More... | |
virtual void | lost (const UPID &) |
Invoked when a linked process can no longer be monitored. More... | |
void | send (const UPID &to, const std::string &name, const char *data=nullptr, size_t length=0) |
Sends the message to the specified UPID . More... | |
void | send (const UPID &to, std::string &&name) |
void | send (const UPID &to, std::string &&name, std::string &&data) |
UPID | link (const UPID &pid, const RemoteConnection remote=RemoteConnection::REUSE) |
Links with the specified UPID . More... | |
void | install (const std::string &name, const MessageHandler &handler) |
Sets up a handler for messages with the specified name. More... | |
template<typename T > | |
void | install (const std::string &name, void(T::*method)(const UPID &, const std::string &)) |
Sets up a handler for messages with the specified name. More... | |
void | delegate (const std::string &name, const UPID &pid) |
Delegates incoming messages, with the specified name, to the UPID . More... | |
void | route (const std::string &name, const Option< std::string > &help, const HttpRequestHandler &handler, const RouteOptions &options=RouteOptions()) |
Sets up a handler for HTTP requests with the specified name. More... | |
template<typename T > | |
void | route (const std::string &name, const Option< std::string > &help, Future< http::Response >(T::*method)(const http::Request &), const RouteOptions &options=RouteOptions()) |
Sets up a handler for HTTP requests with the specified name. More... | |
void | route (const std::string &name, const std::string &realm, const Option< std::string > &help, const AuthenticatedHttpRequestHandler &handler, const RouteOptions &options=RouteOptions()) |
template<typename T > | |
void | route (const std::string &name, const std::string &realm, const Option< std::string > &help, Future< http::Response >(T::*method)(const http::Request &, const Option< http::authentication::Principal > &), const RouteOptions &options=RouteOptions()) |
Sets up a handler for HTTP requests with the specified name. More... | |
void | provide (const std::string &name, const std::string &path, const std::map< std::string, std::string > &types=mime::types) |
Sets up the default HTTP request handler to provide the static asset(s) at the specified absolute path for the specified name. More... | |
template<typename T > | |
size_t | eventCount () |
Returns the number of events of the given type currently on the event queue. More... | |
Additional Inherited Members | |
![]() | |
using | MessageProperty = P(M::*)() const |
![]() | |
typedef CheckerProcess | Self |
typedef CheckerProcess | This |
![]() | |
enum | RemoteConnection { RemoteConnection::REUSE, RemoteConnection::RECONNECT } |
Describes the behavior of the link call when the target pid points to a remote process. More... | |
typedef lambda::function< void(const UPID &, const std::string &)> | MessageHandler |
Any function which takes a "from" UPID and a message body as arguments. More... | |
typedef lambda::function < Future< http::Response > const http::Request &)> | HttpRequestHandler |
Any function which takes a process::http::Request and returns a process::http::Response . More... | |
typedef lambda::function < Future< http::Response > const http::Request &, const Option < http::authentication::Principal > &)> | AuthenticatedHttpRequestHandler |
Any function which takes a process::http::Request and an Option<Principal> and returns a process::http::Response . More... | |
mesos::internal::checks::CheckerProcess::CheckerProcess | ( | const CheckInfo & | _check, |
const std::string & | _launcherDir, | ||
const lambda::function< void(const Try< CheckStatusInfo > &)> & | _callback, | ||
const TaskID & | _taskId, | ||
const Option< pid_t > & | _taskPid, | ||
const std::vector< std::string > & | _namespaces, | ||
const Option< ContainerID > & | _taskContainerId, | ||
const Option< process::http::URL > & | _agentURL, | ||
const Option< std::string > & | _authorizationHeader, | ||
const Option< std::string > & | _scheme, | ||
const std::string & | _name, | ||
bool | _commandCheckViaAgent, | ||
bool | _ipv6 = false |
||
) |
|
inlinevirtual |
|
overrideprotectedvirtual |
Invoked when a process is terminated.
NOTE: this does not get invoked automatically if process::ProcessBase::consume(TerminateEvent&&)
is overridden.
Reimplemented from process::ProcessBase.
|
overrideprotectedvirtual |
Invoked when a process gets spawned.
Reimplemented from process::ProcessBase.
void mesos::internal::checks::CheckerProcess::pause | ( | ) |
void mesos::internal::checks::CheckerProcess::resume | ( | ) |