Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
comms
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
xx network
comms
Commits
05fdb4b1
Commit
05fdb4b1
authored
4 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
added a testing implementation of new manager
parent
c574947b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
connect/manager.go
+8
-0
8 additions, 0 deletions
connect/manager.go
with
8 additions
and
0 deletions
connect/manager.go
+
8
−
0
View file @
05fdb4b1
...
...
@@ -15,6 +15,7 @@ import (
jww
"github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/primitives/id"
"sync"
"testing"
)
// The Manager object provides thread-safe access
...
...
@@ -32,6 +33,13 @@ func newManager() *Manager {
}
}
func
NewManagerTesting
(
t
*
testing
.
T
)
*
Manager
{
if
t
==
nil
{
jww
.
FATAL
.
Panicf
(
"NewMangerTesting is for testing only"
)
}
return
newManager
()
}
// Fetch a Host from the internal map
func
(
m
*
Manager
)
GetHost
(
hostId
*
id
.
ID
)
(
*
Host
,
bool
)
{
m
.
mux
.
RLock
()
...
...
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