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 <string>
21 #include <vector>
22 
23 #include <process/shared.hpp>
24 
25 #include "slave/flags.hpp"
26 
28 
30 
31 namespace mesos {
32 namespace internal {
33 namespace slave {
34 
35 // The volume image isolator is responsible for preparing image
36 // volumes for mesos container.
38 {
39 public:
41  const Flags& flags,
42  const process::Shared<Provisioner>& provisioner);
43 
45 
46  virtual bool supportsNesting();
47  virtual bool supportsStandalone();
48 
50  const ContainerID& containerId,
51  const mesos::slave::ContainerConfig& containerConfig);
52 
53 private:
55  const Flags& flags,
56  const process::Shared<Provisioner>& provisioner);
57 
59  const ContainerID& containerId,
60  const std::vector<std::string>& targets,
61  const std::vector<process::Future<ProvisionInfo>>& futures);
62 
63  const Flags flags;
64  const process::Shared<Provisioner> provisioner;
65 };
66 
67 } // namespace slave {
68 } // namespace internal {
69 } // namespace mesos {
70 
71 #endif // __VOLUME_IMAGE_ISOLATOR_HPP__
Definition: check.hpp:33
Definition: flags.hpp:39
Definition: owned.hpp:26
virtual process::Future< Option< mesos::slave::ContainerLaunchInfo > > prepare(const ContainerID &containerId, const mesos::slave::ContainerConfig &containerConfig)
Definition: spec.hpp:30
Definition: attributes.hpp:24
static Try< mesos::slave::Isolator * > create(const Flags &flags, const process::Shared< Provisioner > &provisioner)
Definition: parse.hpp:33
Definition: future.hpp:58