AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
RateLimiterInterface.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9
10#include <stdint.h>
11#include <chrono>
12
13namespace Aws
14{
15 namespace Utils
16 {
17 namespace RateLimits
18 {
24 {
25 public:
26 using DelayType = std::chrono::milliseconds;
27
32 virtual DelayType ApplyCost(int64_t cost) = 0;
36 virtual void ApplyAndPayForCost(int64_t cost) = 0;
40 virtual void SetRate(int64_t rate, bool resetAccumulator = false) = 0;
41 };
42
43 } // namespace RateLimits
44 } // namespace Utils
45} // namespace Aws
virtual void SetRate(int64_t rate, bool resetAccumulator=false)=0
virtual void ApplyAndPayForCost(int64_t cost)=0
virtual DelayType ApplyCost(int64_t cost)=0