Apache Mesos
image.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __VOLUME_IMAGE_ISOLATOR_HPP__
18 #define __VOLUME_IMAGE_ISOLATOR_HPP__
19 
20 #include <list>
21 #include <string>
22 #include <vector>
23 
24 #include <process/shared.hpp>
25 
26 #include "slave/flags.hpp"
27 
29 
31 
32 namespace mesos {
33 namespace internal {
34 namespace slave {
35 
36 // The volume image isolator is responsible for preparing image
37 // volumes for mesos container.
39 {
40 public:
42  const Flags& flags,
43  const process::Shared<Provisioner>& provisioner);
44 
46 
47  virtual bool supportsNesting();
48  virtual bool supportsStandalone();
49 
51  const ContainerID& containerId,
52  const mesos::slave::ContainerConfig& containerConfig);
53 
54 private:
56  const Flags& flags,
57  const process::Shared<Provisioner>& provisioner);
58 
60  const ContainerID& containerId,
61  const std::vector<std::string>& targets,
63 
64  const Flags flags;
65  const process::Shared<Provisioner> provisioner;
66 };
67 
68 } // namespace slave {
69 } // namespace internal {
70 } // namespace mesos {
71 
72 #endif // __VOLUME_IMAGE_ISOLATOR_HPP__
Definition: try.hpp:34
Definition: flags.hpp:39
Definition: owned.hpp:25
virtual process::Future< Option< mesos::slave::ContainerLaunchInfo > > prepare(const ContainerID &containerId, const mesos::slave::ContainerConfig &containerConfig)
Try< std::vector< Entry > > list(const std::string &hierarchy, const std::string &cgroup)
static Try< mesos::slave::Isolator * > create(const Flags &flags, const process::Shared< Provisioner > &provisioner)
Definition: future.hpp:57