17 #ifndef __CGROUPS_ISOLATOR_SUBSYSTEM_HPP__
18 #define __CGROUPS_ISOLATOR_SUBSYSTEM_HPP__
56 const std::string&
name,
66 virtual std::string
name()
const = 0;
76 const ContainerID& containerId,
77 const std::string&
cgroup);
87 const ContainerID& containerId,
88 const std::string&
cgroup);
99 const ContainerID& containerId,
100 const std::string&
cgroup,
112 const ContainerID& containerId,
113 const std::string&
cgroup);
125 const ContainerID& containerId,
126 const std::string&
cgroup,
139 const ContainerID& containerId,
140 const std::string&
cgroup);
151 const ContainerID& containerId,
152 const std::string&
cgroup);
167 const ContainerID& containerId,
168 const std::string&
cgroup);
188 #endif // __CGROUPS_ISOLATOR_SUBSYSTEM_HPP__
static Try< process::Owned< Subsystem > > create(const Flags &flags, const std::string &name, const std::string &hierarchy)
Attempts to create a specific Subsystem object that will contain specific information associated with...
virtual process::Future< Nothing > prepare(const ContainerID &containerId, const std::string &cgroup)
Prepare the cgroups subsystem for the associated container.
virtual process::Future< mesos::slave::ContainerLimitation > watch(const ContainerID &containerId, const std::string &cgroup)
Watch the container and report if any resource constraint impacts it.
Definition: resources.hpp:79
const Flags flags
Flags used to launch the agent.
Definition: subsystem.hpp:176
DWORD pid_t
Definition: windows.hpp:187
Subsystem(const Flags &_flags, const std::string &_hierarchy)
virtual ~Subsystem()
Definition: subsystem.hpp:59
Result< std::string > cgroup(pid_t pid)
virtual process::Future< Nothing > update(const ContainerID &containerId, const std::string &cgroup, const Resources &resources)
Update resources allocated to the associated container in this cgroups subsystem. ...
virtual process::Future< Nothing > recover(const ContainerID &containerId, const std::string &cgroup)
Recover the cgroups subsystem for the associated container.
An abstraction for cgroups subsystem.
Definition: subsystem.hpp:42
const std::string hierarchy
The hierarchy path of cgroups subsystem.
Definition: subsystem.hpp:181
virtual process::Future< ContainerStatus > status(const ContainerID &containerId, const std::string &cgroup)
Get the run-time status of cgroups subsystem specific properties associated with the container...
virtual std::string name() const =0
The cgroups subsystem name of this Subsystem object.
virtual process::Future< ResourceStatistics > usage(const ContainerID &containerId, const std::string &cgroup)
Gather resource usage statistics of the cgroups subsystem for the associated container.
Definition: process.hpp:493
virtual process::Future< Nothing > cleanup(const ContainerID &containerId, const std::string &cgroup)
Clean up the cgroups subsystem for the associated container.
virtual process::Future< Nothing > isolate(const ContainerID &containerId, const std::string &cgroup, pid_t pid)
Isolate the associated container to cgroups subsystem.