Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bio-rd
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
danet
bio-rd
Commits
9fd9f79b
Commit
9fd9f79b
authored
6 years ago
by
Oliver Herms
Browse files
Options
Downloads
Patches
Plain Diff
Naming
parent
36606609
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
routingtable/client_manager.go
+4
-4
4 additions, 4 deletions
routingtable/client_manager.go
with
4 additions
and
4 deletions
routingtable/client_manager.go
+
4
−
4
View file @
9fd9f79b
...
@@ -3,14 +3,14 @@ package routingtable
...
@@ -3,14 +3,14 @@ package routingtable
// ClientManager manages clients of routing tables (observer pattern)
// ClientManager manages clients of routing tables (observer pattern)
type
ClientManager
struct
{
type
ClientManager
struct
{
clients
map
[
RouteTableClient
]
struct
{}
// Ensures a client registers at most once
clients
map
[
RouteTableClient
]
struct
{}
// Ensures a client registers at most once
rtc
RouteTableClient
master
RouteTableClient
}
}
// NewClientManager creates and initializes a new client manager
// NewClientManager creates and initializes a new client manager
func
NewClientManager
(
rtc
RouteTableClient
)
ClientManager
{
func
NewClientManager
(
master
RouteTableClient
)
ClientManager
{
return
ClientManager
{
return
ClientManager
{
clients
:
make
(
map
[
RouteTableClient
]
struct
{},
0
),
clients
:
make
(
map
[
RouteTableClient
]
struct
{},
0
),
rtc
:
rtc
,
master
:
master
,
}
}
}
}
...
@@ -20,7 +20,7 @@ func (c *ClientManager) Register(client RouteTableClient) {
...
@@ -20,7 +20,7 @@ func (c *ClientManager) Register(client RouteTableClient) {
c
.
clients
=
make
(
map
[
RouteTableClient
]
struct
{},
0
)
c
.
clients
=
make
(
map
[
RouteTableClient
]
struct
{},
0
)
}
}
c
.
clients
[
client
]
=
struct
{}{}
c
.
clients
[
client
]
=
struct
{}{}
c
.
rtc
.
UpdateNewClient
(
client
)
c
.
master
.
UpdateNewClient
(
client
)
}
}
// Unregister unregisters a client
// Unregister unregisters a client
...
...
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