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 __EXAMPLES_FLAGS_HPP__
18 #define __EXAMPLES_FLAGS_HPP__
19 
20 #include <string>
21 
22 #include <stout/flags.hpp>
23 #include <stout/option.hpp>
24 
25 #include "logging/flags.hpp"
26 
27 namespace mesos {
28 namespace internal {
29 namespace examples {
30 
31 class Flags : public virtual mesos::internal::logging::Flags
32 {
33 public:
35  {
37  "master",
38  "The master to connect to. May be one of:\n"
39  " `host:port`\n"
40  " `master@host:port` (PID of the master)\n"
41  " `zk://host1:port1,host2:port2,.../path`\n"
42  " `zk://username:password@host1:port1,host2:port2,.../path`\n"
43  " `file://path/to/file` (where file contains one of the above)\n"
44  " `local` (launches mesos-local)");
45 
47  "authenticate",
48  "Set to 'true' to enable framework authentication.",
49  false);
50 
52  "principal",
53  "The principal used to identify this framework.",
54  "test");
55 
57  "secret",
58  "The secret used to authenticate this framework.\n"
59  "If the value starts with '/' or 'file://' it will be parsed as the\n"
60  "path to a file containing the secret. Otherwise the string value is\n"
61  "treated as the secret.");
62 
64  "checkpoint",
65  "Whether this framework should be checkpointed.",
66  false);
67 
69  "role",
70  "Role to use when registering.",
71  "*");
72  }
73 
74  std::string master;
76  std::string principal;
78  bool checkpoint;
79  std::string role;
80 };
81 
82 
83 } // namespace examples {
84 } // namespace internal {
85 } // namespace mesos {
86 
87 #endif // __EXAMPLES_FLAGS_HPP__
Definition: flags.hpp:29
bool checkpoint
Definition: flags.hpp:78
Definition: flags.hpp:31
Option< std::string > secret
Definition: flags.hpp:77
std::string role
Definition: flags.hpp:79
Definition: agent.hpp:25
std::string master
Definition: flags.hpp:74
Definition: attributes.hpp:24
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
std::string principal
Definition: flags.hpp:76
Flags()
Definition: flags.hpp:34
bool authenticate
Definition: flags.hpp:75