Apache Mesos
runtime.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 __APPC_RUNTIME_ISOLATOR_HPP__
18 #define __APPC_RUNTIME_ISOLATOR_HPP__
19 
21 
22 namespace mesos {
23 namespace internal {
24 namespace slave {
25 
26 // The Appc runtime isolator is responsible for preparing mesos
27 // container by merging runtime configuration specified by user
28 // and Appc image default configuration.
30 {
31 public:
33 
34  ~AppcRuntimeIsolatorProcess() override;
35 
36  bool supportsNesting() override;
37  bool supportsStandalone() override;
38 
40  const ContainerID& containerId,
41  const mesos::slave::ContainerConfig& containerConfig) override;
42 
43 private:
44  AppcRuntimeIsolatorProcess(const Flags& flags);
45 
46  Option<Environment> getLaunchEnvironment(
47  const ContainerID& containerId,
48  const mesos::slave::ContainerConfig& containerConfig);
49 
50  Result<CommandInfo> getLaunchCommand(
51  const ContainerID& containerId,
52  const mesos::slave::ContainerConfig& containerConfig);
53 
54  Option<std::string> getWorkingDirectory(
55  const mesos::slave::ContainerConfig& containerConfig);
56 
57  const Flags flags;
58 };
59 
60 } // namespace slave {
61 } // namespace internal {
62 } // namespace mesos {
63 
64 #endif // __APPC_RUNTIME_ISOLATOR_HPP__
process::Future< Option< mesos::slave::ContainerLaunchInfo > > prepare(const ContainerID &containerId, const mesos::slave::ContainerConfig &containerConfig) override
Definition: option.hpp:29
Definition: check.hpp:33
static Try< mesos::slave::Isolator * > create(const Flags &flags)
Definition: flags.hpp:39
Definition: check.hpp:30
Definition: agent.hpp:25
Definition: attributes.hpp:24
Definition: parse.hpp:33
Definition: future.hpp:58