Apache Mesos
discipline.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 __LINUX_ROUTING_QUEUEING_DISCIPLINE_HPP__
18 #define __LINUX_ROUTING_QUEUEING_DISCIPLINE_HPP__
19 
20 #include <string>
21 
22 #include <stout/option.hpp>
23 
24 #include "linux/routing/handle.hpp"
25 
26 namespace routing {
27 namespace queueing {
28 
29 template <typename Config>
30 struct Discipline
31 {
33  const std::string& _kind,
34  const Handle& _parent,
35  const Option<Handle>& _handle,
36  const Config& _config)
37  : kind(_kind),
38  parent(_parent),
39  handle(_handle),
40  config(_config) {}
41 
42  std::string kind;
45 
46  // TODO(jieyu): Consider making it optional.
47  Config config;
48 };
49 
50 } // namespace queueing {
51 } // namespace routing {
52 
53 #endif // __LINUX_ROUTING_QUEUEING_DISCIPLINE_HPP__
std::string kind
Definition: discipline.hpp:42
Definition: option.hpp:29
Discipline(const std::string &_kind, const Handle &_parent, const Option< Handle > &_handle, const Config &_config)
Definition: discipline.hpp:32
Definition: handle.hpp:38
Option< Handle > handle
Definition: discipline.hpp:44
Definition: diagnosis.hpp:30
Config config
Definition: discipline.hpp:47
Definition: discipline.hpp:30
Handle parent
Definition: discipline.hpp:43