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
0096ca40
Commit
0096ca40
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Fix LoadOrNewManager docstring
parent
b5cb085e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!510
Release
,
!292
Remove ud.LoadManager for LoadOrNewManager
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ud/manager.go
+14
-6
14 additions, 6 deletions
ud/manager.go
with
14 additions
and
6 deletions
ud/manager.go
+
14
−
6
View file @
0096ca40
...
...
@@ -44,10 +44,18 @@ type Manager struct {
alternativeUd
*
alternateUd
}
// LoadOrNewManager builds a new user discovery manager.
// It requires that an updated
// NDF is available and will error if one is not.
// registrationValidationSignature may be set to nil
// LoadOrNewManager loads an existing Manager from storage or creates a
// new one if there is no extant storage information.
//
// Params
// - user is an interface that adheres to the xxdk.E2e object.
// - comms is an interface that adheres to client.Comms object.
// - follower is a method off of xxdk.Cmix which returns the network follower's status.
// - username is the name of the user as it is registered with UD. This will be what the end user
// provides if through the bindings.
// - networkValidationSig is a signature provided by the network (i.e. the client registrar). This may
// be nil if the caller knows the manager will be loaded. If a new manager is created, a nil signature
// will cause an error.
func
LoadOrNewManager
(
user
udE2e
,
comms
Comms
,
follower
udNetworkStatus
,
username
string
,
networkValidationSig
[]
byte
)
(
*
Manager
,
error
)
{
jww
.
INFO
.
Println
(
"ud.LoadOrNewManager()"
)
...
...
@@ -59,8 +67,8 @@ func LoadOrNewManager(user udE2e, comms Comms, follower udNetworkStatus,
// Initialize manager
m
:=
&
Manager
{
user
:
user
,
comms
:
comms
,
user
:
user
,
comms
:
comms
,
}
if
m
.
isRegistered
()
{
...
...
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