Namespace isolation
-
namespace isolation
Enums
-
enum CgroupMode
Values:
-
enumerator cg_off
-
enumerator cg_on
-
enumerator cg_off
Functions
-
std::shared_ptr<NetworkNamespace> claimNetworkNamespace()
-
pid_t getCurrentTid()
-
void addCurrentThreadToTasks(const path &tasksPath)
-
void joinNamespace(const boost::filesystem::path &nsPath)
Variables
-
static const std::string BASE_DIR = "/sys/fs/cgroup/"
-
static const std::string CG_CPU = "cpu"
-
static const std::vector<std::string> controllers = {CG_CPU}
-
static std::mutex groupMutex
-
std::vector<std::shared_ptr<NetworkNamespace>> namespaces
-
bool namespacesInitialised = false
-
std::mutex namespacesLock
-
class CGroup
Public Functions
-
explicit CGroup(const std::string &name)
-
void addCurrentThread()
-
const std::string getName()
-
const CgroupMode getMode()
-
explicit CGroup(const std::string &name)
-
class NetworkNamespace
Public Functions
-
explicit NetworkNamespace(const std::string &name)
-
void addCurrentThread()
-
void removeCurrentThread()
-
const std::string getName()
-
explicit NetworkNamespace(const std::string &name)
-
enum CgroupMode