Apache Mesos
replica.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 __LOG_TOOL_REPLICA_HPP__
18 #define __LOG_TOOL_REPLICA_HPP__
19 
20 #include <stdint.h>
21 
22 #include <stout/flags.hpp>
23 #include <stout/option.hpp>
24 
25 #include "log/tool.hpp"
26 
27 #include "logging/flags.hpp"
28 
29 namespace mesos {
30 namespace internal {
31 namespace log {
32 namespace tool {
33 
34 // Start a replica server.
35 class Replica : public Tool
36 {
37 public:
38  class Flags : public virtual logging::Flags
39  {
40  public:
41  Flags();
42 
47  bool initialize;
48  bool help;
49  };
50 
51  std::string name() const override { return "replica"; }
52  Try<Nothing> execute(int argc = 0, char** argv = nullptr) override;
53 
54  // Users can change the default configuration by setting this flags.
56 };
57 
58 } // namespace tool {
59 } // namespace log {
60 } // namespace internal {
61 } // namespace mesos {
62 
63 #endif // __LOG_TOOL_REPLICA_HPP__
Definition: replica.hpp:35
Try< Nothing > execute(int argc=0, char **argv=nullptr) override
Definition: flags.hpp:29
Definition: check.hpp:33
bool initialize
Definition: replica.hpp:47
Option< std::string > servers
Definition: replica.hpp:45
bool help
Definition: replica.hpp:48
Definition: agent.hpp:25
std::string name() const override
Definition: replica.hpp:51
Definition: attributes.hpp:24
Option< std::string > znode
Definition: replica.hpp:46
Definition: tool.hpp:31
Flags flags
Definition: replica.hpp:55
Option< size_t > quorum
Definition: replica.hpp:43
Option< std::string > path
Definition: replica.hpp:44