Apache Mesos
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
src
examples
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
:
34
Flags
()
35
{
36
add
(&
Flags::master
,
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
46
add
(&
Flags::authenticate
,
47
"authenticate"
,
48
"Set to 'true' to enable framework authentication."
,
49
false
);
50
51
add
(&
Flags::principal
,
52
"principal"
,
53
"The principal used to identify this framework."
,
54
"test"
);
55
56
add
(&
Flags::secret
,
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
63
add
(&
Flags::checkpoint
,
64
"checkpoint"
,
65
"Whether this framework should be checkpointed."
,
66
false
);
67
68
add
(&
Flags::role
,
69
"role"
,
70
"Role to use when registering."
,
71
"*"
);
72
}
73
74
std::string
master
;
75
bool
authenticate
;
76
std::string
principal
;
77
Option<std::string>
secret
;
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__
Option< std::string >
mesos::internal::logging::Flags
Definition:
flags.hpp:29
mesos::internal::examples::Flags::checkpoint
bool checkpoint
Definition:
flags.hpp:78
mesos::internal::examples::Flags
Definition:
flags.hpp:31
mesos::internal::examples::Flags::secret
Option< std::string > secret
Definition:
flags.hpp:77
mesos::internal::examples::Flags::role
std::string role
Definition:
flags.hpp:79
mesos
Definition:
agent.hpp:25
flags.hpp
option.hpp
mesos::internal::examples::Flags::master
std::string master
Definition:
flags.hpp:74
internal
Definition:
attributes.hpp:24
flags::FlagsBase::add
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
mesos::internal::examples::Flags::principal
std::string principal
Definition:
flags.hpp:76
mesos::internal::examples::Flags::Flags
Flags()
Definition:
flags.hpp:34
flags.hpp
mesos::internal::examples::Flags::authenticate
bool authenticate
Definition:
flags.hpp:75
Generated by
1.8.11