Apache Mesos
flags.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 __SCHEDULER_FLAGS_HPP__
18 #define __SCHEDULER_FLAGS_HPP__
19 
20 #include <string>
21 
22 #include <mesos/mesos.hpp>
23 
24 #include "common/parse.hpp"
25 
26 #include "local/flags.hpp"
27 
28 #include "scheduler/constants.hpp"
29 
30 namespace mesos {
31 namespace v1 {
32 namespace scheduler {
33 
34 class Flags : public virtual mesos::internal::local::Flags
35 {
36 public:
38  {
40  "connection_delay_max",
41  "The maximum amount of time to wait before trying to initiate a\n"
42  "connection with the master. The library waits for a random amount of\n"
43  "time between [0, b], where `b = connection_delay_max` before\n"
44  "initiating a (re-)connection attempt with the master.",
46 
48  "http_authenticatee",
49  "HTTP authenticatee implementation to use when authenticating against\n"
50  "the master. Use the default '" +
52  "' or load an alternate\n"
53  "authenticatee module using MESOS_MODULES.",
55 
56  // This help message for --modules flag is the same for
57  // {master,slave,sched,tests}/flags.[ch]pp and should always be kept
58  // in sync.
59  // TODO(karya): Remove the JSON example and add reference to the
60  // doc file explaining the --modules flag.
62  "modules",
63  "List of modules to be loaded and be available to the internal\n"
64  "subsystems.\n"
65  "\n"
66  "Use --modules=filepath to specify the list of modules via a\n"
67  "file containing a JSON formatted string. 'filepath' can be\n"
68  "of the form 'file:///path/to/file' or '/path/to/file'.\n"
69  "\n"
70  "Use --modules=\"{...}\" to specify the list of modules inline.\n"
71  "\n"
72  "Example:\n"
73  "{\n"
74  " \"libraries\": [\n"
75  " {\n"
76  " \"file\": \"/path/to/libfoo.so\",\n"
77  " \"modules\": [\n"
78  " {\n"
79  " \"name\": \"org_apache_mesos_bar\",\n"
80  " \"parameters\": [\n"
81  " {\n"
82  " \"key\": \"X\",\n"
83  " \"value\": \"Y\"\n"
84  " }\n"
85  " ]\n"
86  " },\n"
87  " {\n"
88  " \"name\": \"org_apache_mesos_baz\"\n"
89  " }\n"
90  " ]\n"
91  " },\n"
92  " {\n"
93  " \"name\": \"qux\",\n"
94  " \"modules\": [\n"
95  " {\n"
96  " \"name\": \"org_apache_mesos_norf\"\n"
97  " }\n"
98  " ]\n"
99  " }\n"
100  " ]\n"
101  "}");
102 
103  // This help message for --modules_dir flag is the same for
104  // {master,slave,sched,tests}/flags.[ch]pp and should always be kept
105  // in sync.
107  "modules_dir",
108  "Directory path of the module manifest files.\n"
109  "The manifest files are processed in alphabetical order.\n"
110  "(See --modules for more information on module manifest files).\n"
111  "Cannot be used in conjunction with --modules.\n");
112  }
113 
117  std::string httpAuthenticatee;
118 };
119 
120 } // namespace scheduler {
121 } // namespace v1 {
122 } // namespace mesos {
123 
124 #endif // __SCHEDULER_FLAGS_HPP__
Option< Modules > modules
Definition: flags.hpp:115
Definition: flags.hpp:34
constexpr char DEFAULT_BASIC_HTTP_AUTHENTICATEE[]
Definition: http.hpp:79
Flags()
Definition: flags.hpp:37
std::string httpAuthenticatee
Definition: flags.hpp:117
Definition: duration.hpp:32
Definition: agent.hpp:25
Duration connectionDelayMax
Definition: flags.hpp:114
Definition: flags.hpp:30
Option< std::string > modulesDir
Definition: flags.hpp:116
void add(T1 Flags::*t1, const Name &name, const Option< Name > &alias, const std::string &help, const T2 *t2, F validate)
Definition: flags.hpp:333
constexpr Duration DEFAULT_CONNECTION_DELAY_MAX
Definition: constants.hpp:28