mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-15 12:53:42 +00:00
Add ability to get number of tokens.
Add a method to fetch the current number of available tokens.
This commit is contained in:
parent
060db62644
commit
f5ce6752be
@ -73,3 +73,8 @@ bool token_bucket::claim(uint64_t now)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
double token_bucket::get_tokens()
|
||||
{
|
||||
return m_tokens;
|
||||
}
|
||||
|
@ -38,6 +38,10 @@ public:
|
||||
// internal metrics.
|
||||
//
|
||||
bool claim(uint64_t now = 0);
|
||||
|
||||
// Return the current number of tokens available
|
||||
double get_tokens();
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user