Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
e4951b5d
Commit
e4951b5d
authored
Dec 16, 2021
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Add GetRateLimitParams to bindings
parent
07665ab6
No related branches found
No related tags found
2 merge requests
!117
Release
,
!83
Add EKV backed leaky bucket storage
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/client.go
+7
-0
7 additions, 0 deletions
api/client.go
bindings/client.go
+5
-0
5 additions, 0 deletions
bindings/client.go
with
12 additions
and
0 deletions
api/client.go
+
7
−
0
View file @
e4951b5d
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
bindings/client.go
+
5
−
0
View file @
e4951b5d
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment