Apache Mesos
limiter.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 __TEST_LIMITER_HPP__
18 #define __TEST_LIMITER_HPP__
19 
20 #include <gmock/gmock.h>
21 
22 #include <process/limiter.hpp>
23 
24 #include <stout/duration.hpp>
25 
26 namespace mesos {
27 namespace internal {
28 namespace tests {
29 
31 {
32 public:
33  // We initialize the rate limiter to 1 per second because it has to
34  // be non-zero, but this value has no effect since this is a mock.
36 
38 };
39 
40 } // namespace tests {
41 } // namespace internal {
42 } // namespace mesos {
43 
44 #endif // __TEST_LIMITER_HPP__
virtual Future< Nothing > acquire() const
Definition: limiter.hpp:182
MOCK_CONST_METHOD0(acquire, process::Future< Nothing >())
Definition: duration.hpp:207
Definition: agent.hpp:25
MockRateLimiter()
Definition: limiter.hpp:35
Definition: attributes.hpp:24
Definition: executor.hpp:48
Definition: limiter.hpp:30
Definition: limiter.hpp:42
RateLimiter(int permits, const Duration &duration)
Definition: limiter.hpp:160