Apache Mesos
container_logger.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 __MESOS_MODULE_CONTAINER_LOGGER_HPP__
18 #define __MESOS_MODULE_CONTAINER_LOGGER_HPP__
19 
20 #include <mesos/mesos.hpp>
21 #include <mesos/module.hpp>
22 
24 
25 namespace mesos {
26 namespace modules {
27 
28 template <>
29 inline const char* kind<mesos::slave::ContainerLogger>()
30 {
31  return "ContainerLogger";
32 }
33 
34 
35 template <>
37 {
39  const char* _moduleApiVersion,
40  const char* _mesosVersion,
41  const char* _authorName,
42  const char* _authorEmail,
43  const char* _description,
44  bool (*_compatible)(),
46  (*_create)(const Parameters& parameters))
47  : ModuleBase(
48  _moduleApiVersion,
49  _mesosVersion,
50  mesos::modules::kind<mesos::slave::ContainerLogger>(),
51  _authorName,
52  _authorEmail,
53  _description,
54  _compatible),
55  create(_create) {}
56 
57  mesos::slave::ContainerLogger* (*create)(const Parameters& parameters);
58 };
59 
60 } // namespace modules {
61 } // namespace mesos {
62 
63 #endif // __MESOS_MODULE_CONTAINER_LOGGER_HPP__
Module(const char *_moduleApiVersion, const char *_mesosVersion, const char *_authorName, const char *_authorEmail, const char *_description, bool(*_compatible)(), mesos::slave::ContainerLogger *(*_create)(const Parameters &parameters))
Definition: container_logger.hpp:38
Definition: module.hpp:56
const char * kind()
Definition: agent.hpp:25
A containerizer component used to manage container logs.
Definition: container_logger.hpp:61
Try< Nothing > create(const std::string &hierarchy, const std::string &cgroup, bool recursive=false)
Definition: module.hpp:97