Apache Mesos
Classes | Public Member Functions | Friends | List of all members
mesos::internal::slave::MesosContainerizerProcess Class Reference

#include <containerizer.hpp>

Inheritance diagram for mesos::internal::slave::MesosContainerizerProcess:
process::Process< MesosContainerizerProcess > process::ProcessBase process::EventConsumer

Public Member Functions

 MesosContainerizerProcess (const Flags &_flags, Fetcher *_fetcher, GarbageCollector *_gc, IOSwitchboard *_ioSwitchboard, const process::Owned< Launcher > &_launcher, const process::Shared< Provisioner > &_provisioner, const std::vector< process::Owned< mesos::slave::Isolator >> &_isolators, VolumeGidManager *_volumeGidManager, const Option< int_fd > &_initMemFd, const Option< int_fd > &_commandExecutorMemFd)
 
 ~MesosContainerizerProcess () override
 
virtual process::Future< Nothingrecover (const Option< state::SlaveState > &state)
 
virtual process::Future< Containerizer::LaunchResultlaunch (const ContainerID &containerId, const mesos::slave::ContainerConfig &containerConfig, const std::map< std::string, std::string > &environment, const Option< std::string > &pidCheckpointPath)
 
virtual process::Future< process::http::Connectionattach (const ContainerID &containerId)
 
virtual process::Future< Nothingupdate (const ContainerID &containerId, const Resources &resourceRequests, const google::protobuf::Map< std::string, Value::Scalar > &resourceLimits={})
 
virtual process::Future< ResourceStatistics > usage (const ContainerID &containerId)
 
virtual process::Future< ContainerStatus > status (const ContainerID &containerId)
 
virtual process::Future< Option< mesos::slave::ContainerTermination > > wait (const ContainerID &containerId)
 
virtual process::Future< Containerizer::LaunchResultexec (const ContainerID &containerId, int_fd pipeWrite)
 
virtual process::Future< Option< mesos::slave::ContainerTermination > > destroy (const ContainerID &containerId, const Option< mesos::slave::ContainerTermination > &termination)
 
virtual process::Future< bool > kill (const ContainerID &containerId, int signal)
 
virtual process::Future< Nothingremove (const ContainerID &containerId)
 
virtual process::Future< hashset< ContainerID > > containers ()
 
virtual process::Future< NothingpruneImages (const std::vector< Image > &excludedImages)
 
- Public Member Functions inherited from process::Process< MesosContainerizerProcess >
 ~Process () override
 
PID< MesosContainerizerProcess > self () const
 Returns the PID of the process. More...
 
- Public Member Functions inherited from process::ProcessBase
 ProcessBase (const std::string &id="")
 
 ~ProcessBase () override
 
const UPIDself () const
 
- Public Member Functions inherited from process::EventConsumer
virtual ~EventConsumer ()
 

Friends

std::ostream & operator<< (std::ostream &stream, const State &state)
 

Additional Inherited Members

- Protected Types inherited from process::Process< MesosContainerizerProcess >
typedef MesosContainerizerProcess Self
 
typedef MesosContainerizerProcess This
 
- Protected Types inherited from process::ProcessBase
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...
 
- Protected Member Functions inherited from process::ProcessBase
virtual void serve (Event &&event)
 Invoked when an event is serviced. More...
 
void consume (MessageEvent &&event) override
 
void consume (DispatchEvent &&event) override
 
void consume (HttpEvent &&event) override
 
void consume (ExitedEvent &&event) override
 
void consume (TerminateEvent &&event) override
 
virtual void initialize ()
 Invoked when a process gets spawned. More...
 
virtual void finalize ()
 Invoked when a process is terminated. More...
 
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 Option< 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())
 Forwards to the correct overload of process::ProcessBase::route(), depending on whether the authentication realm realm is present. 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...
 

Constructor & Destructor Documentation

mesos::internal::slave::MesosContainerizerProcess::MesosContainerizerProcess ( const Flags _flags,
Fetcher _fetcher,
GarbageCollector _gc,
IOSwitchboard _ioSwitchboard,
const process::Owned< Launcher > &  _launcher,
const process::Shared< Provisioner > &  _provisioner,
const std::vector< process::Owned< mesos::slave::Isolator >> &  _isolators,
VolumeGidManager _volumeGidManager,
const Option< int_fd > &  _initMemFd,
const Option< int_fd > &  _commandExecutorMemFd 
)
inline
mesos::internal::slave::MesosContainerizerProcess::~MesosContainerizerProcess ( )
inlineoverride

Member Function Documentation

virtual process::Future<process::http::Connection> mesos::internal::slave::MesosContainerizerProcess::attach ( const ContainerID &  containerId)
virtual
virtual process::Future<hashset<ContainerID> > mesos::internal::slave::MesosContainerizerProcess::containers ( )
virtual
virtual process::Future<Option<mesos::slave::ContainerTermination> > mesos::internal::slave::MesosContainerizerProcess::destroy ( const ContainerID &  containerId,
const Option< mesos::slave::ContainerTermination > &  termination 
)
virtual
virtual process::Future<Containerizer::LaunchResult> mesos::internal::slave::MesosContainerizerProcess::exec ( const ContainerID &  containerId,
int_fd  pipeWrite 
)
virtual
virtual process::Future<bool> mesos::internal::slave::MesosContainerizerProcess::kill ( const ContainerID &  containerId,
int  signal 
)
virtual
virtual process::Future<Containerizer::LaunchResult> mesos::internal::slave::MesosContainerizerProcess::launch ( const ContainerID &  containerId,
const mesos::slave::ContainerConfig &  containerConfig,
const std::map< std::string, std::string > &  environment,
const Option< std::string > &  pidCheckpointPath 
)
virtual
virtual process::Future<Nothing> mesos::internal::slave::MesosContainerizerProcess::pruneImages ( const std::vector< Image > &  excludedImages)
virtual
virtual process::Future<Nothing> mesos::internal::slave::MesosContainerizerProcess::recover ( const Option< state::SlaveState > &  state)
virtual
virtual process::Future<Nothing> mesos::internal::slave::MesosContainerizerProcess::remove ( const ContainerID &  containerId)
virtual
virtual process::Future<ContainerStatus> mesos::internal::slave::MesosContainerizerProcess::status ( const ContainerID &  containerId)
virtual
virtual process::Future<Nothing> mesos::internal::slave::MesosContainerizerProcess::update ( const ContainerID &  containerId,
const Resources resourceRequests,
const google::protobuf::Map< std::string, Value::Scalar > &  resourceLimits = {} 
)
virtual
virtual process::Future<ResourceStatistics> mesos::internal::slave::MesosContainerizerProcess::usage ( const ContainerID &  containerId)
virtual
virtual process::Future<Option<mesos::slave::ContainerTermination> > mesos::internal::slave::MesosContainerizerProcess::wait ( const ContainerID &  containerId)
virtual

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const State &  state 
)
friend

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