Apache Mesos
launcher_tracker.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 __LAUNCHER_TRACKER_HPP__
18 #define __LAUNCHER_TRACKER_HPP__
19 
20 #include <process/owned.hpp>
21 
23 
24 namespace mesos {
25 namespace internal {
26 namespace slave {
27 
28 class LauncherTracker : public Launcher
29 {
30 public:
32  const process::Owned<Launcher>& _launcher,
33  PendingFutureTracker* _tracker);
34 
36  const std::vector<mesos::slave::ContainerState>& states) override;
37 
39  const ContainerID& containerId,
40  const std::string& path,
41  const std::vector<std::string>& argv,
42  const mesos::slave::ContainerIO& containerIO,
43  const flags::FlagsBase* flags,
44  const Option<std::map<std::string, std::string>>& environment,
45  const Option<int>& enterNamespaces,
46  const Option<int>& cloneNamespaces,
47  const std::vector<int_fd>& whitelistFds) override;
48 
49  process::Future<Nothing> destroy(const ContainerID& containerId) override;
50 
52  const ContainerID& containerId) override;
53 
54 private:
55  process::Owned<Launcher> launcher;
56  PendingFutureTracker* tracker;
57 };
58 
59 } // namespace slave {
60 } // namespace internal {
61 } // namespace mesos {
62 
63 #endif // __LAUNCHER_TRACKER_HPP__
process::Future< hashset< ContainerID > > recover(const std::vector< mesos::slave::ContainerState > &states) override
Definition: path.hpp:29
Definition: launcher.hpp:47
Definition: option.hpp:29
LauncherTracker(const process::Owned< Launcher > &_launcher, PendingFutureTracker *_tracker)
Definition: check.hpp:33
An abstraction around the IO classes used to redirect stdin/stdout/stderr to/from a container by the ...
Definition: containerizer.hpp:37
process::Future< Nothing > destroy(const ContainerID &containerId) override
Environment * environment
Definition: future_tracker.hpp:84
Definition: flags.hpp:44
Definition: agent.hpp:25
process::Future< ContainerStatus > status(const ContainerID &containerId) override
Definition: attributes.hpp:24
Definition: owned.hpp:36
Definition: parse.hpp:33
Definition: launcher_tracker.hpp:28
Try< pid_t > fork(const ContainerID &containerId, const std::string &path, const std::vector< std::string > &argv, const mesos::slave::ContainerIO &containerIO, const flags::FlagsBase *flags, const Option< std::map< std::string, std::string >> &environment, const Option< int > &enterNamespaces, const Option< int > &cloneNamespaces, const std::vector< int_fd > &whitelistFds) override
Definition: future.hpp:58