Skip to content
Snippets Groups Projects
Commit e4951b5d authored by Josh Brooks's avatar Josh Brooks
Browse files

Add GetRateLimitParams to bindings

parent 07665ab6
No related branches found
No related tags found
2 merge requests!117Release,!83Add EKV backed leaky bucket storage
......@@ -579,6 +579,13 @@ func (c *Client) GetNetworkInterface() interfaces.NetworkManager {
return c.network
}
// GetRateLimitParams retrieves the rate limiting parameters.
func (c *Client) GetRateLimitParams() (uint32, uint32, int64) {
rateLimitParams := c.storage.GetBucketParams().Get()
return rateLimitParams.Capacity, rateLimitParams.LeakedTokens,
rateLimitParams.LeakDuration.Nanoseconds()
}
// GetNodeRegistrationStatus gets the current state of node registration. It
// returns the total number of nodes in the NDF and the number of those which
// are currently registers with. An error is returned if the network is not
......
......@@ -485,6 +485,11 @@ func (c *Client) GetPreferredBins(countryCode string) (string, error) {
return buff.String(), nil
}
// GetRateLimitParams retrieves the rate limiting parameters.
func (c *Client) GetRateLimitParams() (uint32, uint32, int64) {
return c.api.GetRateLimitParams()
}
/*
// SearchWithHandler is a non-blocking search that also registers
// a callback interface for user disovery events.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment