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
b1cf5ad3
Commit
b1cf5ad3
authored
Feb 4, 2021
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Command line hookup for E2E Session Parameters
parent
71be5e93
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmd/root.go
+33
-0
33 additions, 0 deletions
cmd/root.go
with
33 additions
and
0 deletions
cmd/root.go
+
33
−
0
View file @
b1cf5ad3
...
@@ -229,6 +229,14 @@ func initClient() *api.Client {
...
@@ -229,6 +229,14 @@ func initClient() *api.Client {
storeDir
:=
viper
.
GetString
(
"session"
)
storeDir
:=
viper
.
GetString
(
"session"
)
netParams
:=
params
.
GetDefaultNetwork
()
netParams
:=
params
.
GetDefaultNetwork
()
netParams
.
E2EParams
.
MinKeys
=
uint16
(
viper
.
GetUint
(
"e2eMinKeys"
))
netParams
.
E2EParams
.
MaxKeys
=
uint16
(
viper
.
GetUint
(
"e2eMaxKeys"
))
netParams
.
E2EParams
.
NumRekeys
=
uint16
(
viper
.
GetUint
(
"e2eNumReKeys"
))
netParams
.
E2EParams
.
TTLParams
.
TTLScalar
=
float64
(
viper
.
GetUint
(
"e2eTTLScalar"
))
netParams
.
E2EParams
.
TTLParams
.
MinNumKeys
=
uint16
(
viper
.
GetUint
(
"e2eTTLMinNumKeys"
))
netParams
.
ForceHistoricalRounds
=
viper
.
GetBool
(
"forceHistoricalRounds"
)
netParams
.
ForceHistoricalRounds
=
viper
.
GetBool
(
"forceHistoricalRounds"
)
//load the client
//load the client
...
@@ -624,6 +632,31 @@ func init() {
...
@@ -624,6 +632,31 @@ func init() {
"Force all rounds to be sent to historical round retrieval"
)
"Force all rounds to be sent to historical round retrieval"
)
viper
.
BindPFlag
(
"forceHistoricalRounds"
,
viper
.
BindPFlag
(
"forceHistoricalRounds"
,
rootCmd
.
Flags
()
.
Lookup
(
"forceHistoricalRounds"
))
rootCmd
.
Flags
()
.
Lookup
(
"forceHistoricalRounds"
))
// E2E Params
defaultE2EParams
:=
params
.
GetDefaultE2ESessionParams
()
rootCmd
.
Flags
()
.
UintP
(
"e2eMinKeys"
,
""
,
uint
(
defaultE2EParams
.
MinKeys
),
"Minimum number of keys used before requesting rekey"
)
viper
.
BindPFlag
(
"MinKeys"
,
rootCmd
.
Flags
()
.
Lookup
(
"e2eMinKeys"
))
rootCmd
.
Flags
()
.
UintP
(
"e2eMaxKeys"
,
""
,
uint
(
defaultE2EParams
.
MaxKeys
),
"Max keys used before blocking until a rekey completes"
)
viper
.
BindPFlag
(
"e2eMaxKeys"
,
rootCmd
.
Flags
()
.
Lookup
(
"e2eMaxKeys"
))
rootCmd
.
Flags
()
.
UintP
(
"e2eNumReKeys"
,
""
,
uint
(
defaultE2EParams
.
NumRekeys
),
"Number of rekeys held in memory at once"
)
viper
.
BindPFlag
(
"e2eNumReKeys"
,
rootCmd
.
Flags
()
.
Lookup
(
"e2eNumReKeys"
))
rootCmd
.
Flags
()
.
Float64P
(
"e2eTTLScalar"
,
""
,
defaultE2EParams
.
TTLParams
.
TTLScalar
,
"Time to live key retrigger setting"
)
viper
.
BindPFlag
(
"e2eTTLScalar"
,
rootCmd
.
Flags
()
.
Lookup
(
"e2eTTLScalar"
))
rootCmd
.
Flags
()
.
UintP
(
"e2eTTLMinNumKeys"
,
""
,
uint
(
defaultE2EParams
.
TTLParams
.
MinNumKeys
),
"Minimum number of keys used in the TTL"
)
viper
.
BindPFlag
(
"e2eTTLMinNumKeys"
,
rootCmd
.
Flags
()
.
Lookup
(
"e2eTTLMinNumKeys"
))
}
}
// initConfig reads in config file and ENV variables if set.
// initConfig reads in config file and ENV variables if set.
...
...
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