17 #ifndef __MESOS_EXECUTOR_HPP__ 18 #define __MESOS_EXECUTOR_HPP__ 58 class ExecutorProcess;
85 virtual void registered(
87 const ExecutorInfo& executorInfo,
88 const FrameworkInfo& frameworkInfo,
89 const SlaveInfo& slaveInfo) = 0;
92 virtual void reregistered(
94 const SlaveInfo& slaveInfo) = 0;
105 virtual void launchTask(
107 const TaskInfo& task) = 0;
114 virtual void killTask(
116 const TaskID& taskId) = 0;
121 virtual void frameworkMessage(
123 const std::string& data) = 0;
137 const std::string& message) = 0;
155 virtual Status
start() = 0;
158 virtual Status stop() = 0;
167 virtual Status abort() = 0;
173 virtual Status
join() = 0;
176 virtual Status
run() = 0;
183 virtual Status sendStatusUpdate(
const TaskStatus&
status) = 0;
188 virtual Status sendFrameworkMessage(
const std::string& data) = 0;
229 const std::map<std::string, std::string>&
environment);
238 Status
start()
override;
239 Status stop()
override;
240 Status abort()
override;
241 Status
join()
override;
242 Status
run()
override;
243 Status sendStatusUpdate(
const TaskStatus&
status)
override;
244 Status sendFrameworkMessage(
const std::string& data)
override;
247 friend class internal::ExecutorProcess;
252 internal::ExecutorProcess*
process;
255 std::recursive_mutex mutex;
268 #endif // __MESOS_EXECUTOR_HPP__ Definition: executor.hpp:147
Result< ProcessStatus > status(pid_t pid)
Definition: proc.hpp:166
Definition: executor.hpp:212
std::string join(const std::string &path1, const std::string &path2, const char _separator=os::PATH_SEPARATOR)
Definition: path.hpp:116
virtual ~Executor()
Definition: executor.hpp:79
Try< Nothing > start(const std::string &name)
Starts the slice with the given name (via 'systemctl start <name>').
virtual ~ExecutorDriver()
Definition: executor.hpp:151
Environment * environment
Definition: executor.hpp:75
Future< R > run(R(*method)())
Definition: run.hpp:55
Result< Process > process(pid_t pid)
Definition: freebsd.hpp:30
Definition: attributes.hpp:24
std::string error(const std::string &msg, uint32_t code)
Definition: executor.hpp:48