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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
efcd42de
Commit
efcd42de
authored
4 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Make fast polling a configurable option
parent
5b5674b8
No related branches found
No related tags found
1 merge request
!23
Release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
cmd/root.go
+8
-0
8 additions, 0 deletions
cmd/root.go
with
10 additions
and
0 deletions
README.md
+
2
−
0
View file @
efcd42de
...
@@ -160,6 +160,8 @@ Flags:
...
@@ -160,6 +160,8 @@ Flags:
base64 representations) (default "0")
base64 representations) (default "0")
--forceHistoricalRounds Force all rounds to be sent to historical
--forceHistoricalRounds Force all rounds to be sent to historical
round retrieval
round retrieval
--fastPolling bool Enables polling for filtered network updates.
Defaults to true if not set
-h, --help help for client
-h, --help help for client
-l, --log string Path to the log output path (- is stdout)
-l, --log string Path to the log output path (- is stdout)
(default "-")
(default "-")
...
...
This diff is collapsed.
Click to expand it.
cmd/root.go
+
8
−
0
View file @
efcd42de
...
@@ -309,6 +309,7 @@ func createClient() *api.Client {
...
@@ -309,6 +309,7 @@ func createClient() *api.Client {
netParams
.
E2EParams
.
NumRekeys
=
uint16
(
netParams
.
E2EParams
.
NumRekeys
=
uint16
(
viper
.
GetUint
(
"e2eNumReKeys"
))
viper
.
GetUint
(
"e2eNumReKeys"
))
netParams
.
ForceHistoricalRounds
=
viper
.
GetBool
(
"forceHistoricalRounds"
)
netParams
.
ForceHistoricalRounds
=
viper
.
GetBool
(
"forceHistoricalRounds"
)
netParams
.
FastPolling
=
viper
.
GetBool
(
"fastPolling"
)
client
,
err
:=
api
.
OpenClient
(
storeDir
,
[]
byte
(
pass
),
netParams
)
client
,
err
:=
api
.
OpenClient
(
storeDir
,
[]
byte
(
pass
),
netParams
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -329,6 +330,7 @@ func initClient() *api.Client {
...
@@ -329,6 +330,7 @@ func initClient() *api.Client {
netParams
.
E2EParams
.
NumRekeys
=
uint16
(
netParams
.
E2EParams
.
NumRekeys
=
uint16
(
viper
.
GetUint
(
"e2eNumReKeys"
))
viper
.
GetUint
(
"e2eNumReKeys"
))
netParams
.
ForceHistoricalRounds
=
viper
.
GetBool
(
"forceHistoricalRounds"
)
netParams
.
ForceHistoricalRounds
=
viper
.
GetBool
(
"forceHistoricalRounds"
)
netParams
.
FastPolling
=
viper
.
GetBool
(
"fastPolling"
)
//load the client
//load the client
client
,
err
:=
api
.
Login
(
storeDir
,
[]
byte
(
pass
),
netParams
)
client
,
err
:=
api
.
Login
(
storeDir
,
[]
byte
(
pass
),
netParams
)
...
@@ -722,6 +724,12 @@ func init() {
...
@@ -722,6 +724,12 @@ func init() {
viper
.
BindPFlag
(
"forceHistoricalRounds"
,
viper
.
BindPFlag
(
"forceHistoricalRounds"
,
rootCmd
.
Flags
()
.
Lookup
(
"forceHistoricalRounds"
))
rootCmd
.
Flags
()
.
Lookup
(
"forceHistoricalRounds"
))
// Network params
rootCmd
.
Flags
()
.
BoolP
(
"fastPolling"
,
""
,
true
,
"Enables polling for filtered network updates"
)
viper
.
BindPFlag
(
"fastPolling"
,
rootCmd
.
Flags
()
.
Lookup
(
"fastPolling"
))
// E2E Params
// E2E Params
defaultE2EParams
:=
params
.
GetDefaultE2ESessionParams
()
defaultE2EParams
:=
params
.
GetDefaultE2ESessionParams
()
rootCmd
.
Flags
()
.
UintP
(
"e2eMinKeys"
,
rootCmd
.
Flags
()
.
UintP
(
"e2eMinKeys"
,
...
...
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