Apache Mesos
authorizer.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_AUTHORIZER_HPP__
18 #define __MESOS_MODULE_AUTHORIZER_HPP__
19 
20 #include <mesos/module.hpp>
21 
23 
24 namespace mesos {
25 namespace modules {
26 
27 template <>
28 inline const char* kind<mesos::Authorizer>()
29 {
30  return "Authorizer";
31 }
32 
33 
34 template <>
36 {
38  const char* _moduleApiVersion,
39  const char* _mesosVersion,
40  const char* _authorName,
41  const char* _authorEmail,
42  const char* _description,
43  bool (*_compatible)(),
44  mesos::Authorizer* (*_create)(const Parameters& parameters))
45  : ModuleBase(
46  _moduleApiVersion,
47  _mesosVersion,
48  mesos::modules::kind<mesos::Authorizer>(),
49  _authorName,
50  _authorEmail,
51  _description,
52  _compatible),
53  create(_create) {}
54 
55  mesos::Authorizer* (*create)(const Parameters& parameters);
56 };
57 
58 } // namespace modules {
59 } // namespace mesos {
60 
61 #endif // __MESOS_MODULE_AUTHORIZER_HPP__
Module(const char *_moduleApiVersion, const char *_mesosVersion, const char *_authorName, const char *_authorEmail, const char *_description, bool(*_compatible)(), mesos::Authorizer *(*_create)(const Parameters &parameters))
Definition: authorizer.hpp:37
Definition: module.hpp:56
const char * kind()
This interface is used to enable an identity service or any other back end to check authorization pol...
Definition: authorizer.hpp:268
Definition: agent.hpp:25
Try< Nothing > create(const std::string &hierarchy, const std::string &cgroup, bool recursive=false)
Definition: module.hpp:97