Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
1a4d55ab
Commit
1a4d55ab
authored
Jan 18, 2020
by
Miek Gieben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
Signed-off-by:
Miek Gieben
<
miek@miek.nl
>
parent
9d912fe2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
plugin/traffic/xds/client.go
plugin/traffic/xds/client.go
+1
-1
plugin/traffic/xds/fields.go
plugin/traffic/xds/fields.go
+4
-4
No files found.
plugin/traffic/xds/client.go
View file @
1a4d55ab
...
@@ -110,7 +110,7 @@ func (c *Client) Run() {
...
@@ -110,7 +110,7 @@ func (c *Client) Run() {
}
}
if
first
{
if
first
{
log
.
Info
(
"gRPC stream established to %q"
,
c
.
to
)
log
.
Info
f
(
"gRPC stream established to %q"
,
c
.
to
)
c
.
setSynced
()
c
.
setSynced
()
first
=
false
first
=
false
}
}
...
...
plugin/traffic/xds/fields.go
View file @
1a4d55ab
package
xds
package
xds
// Assignment returns the current assignment map.
// Assignment
s
returns the current assignment map.
func
(
c
*
Client
)
Assignments
()
*
assignment
{
func
(
c
*
Client
)
Assignments
()
*
assignment
{
c
.
mu
.
RLock
()
c
.
mu
.
RLock
()
defer
c
.
mu
.
RUnlock
()
defer
c
.
mu
.
RUnlock
()
return
c
.
assignments
return
c
.
assignments
}
}
// SetAssignment sets the assignment map.
// SetAssignment
s
sets the assignment map.
func
(
c
*
Client
)
SetAssignments
(
a
*
assignment
)
{
func
(
c
*
Client
)
SetAssignments
(
a
*
assignment
)
{
c
.
mu
.
Lock
()
c
.
mu
.
Lock
()
defer
c
.
mu
.
Unlock
()
defer
c
.
mu
.
Unlock
()
...
@@ -42,14 +42,14 @@ func (c *Client) SetNonce(typeURL, n string) {
...
@@ -42,14 +42,14 @@ func (c *Client) SetNonce(typeURL, n string) {
c
.
nonce
[
typeURL
]
=
n
c
.
nonce
[
typeURL
]
=
n
}
}
//
S
etSynced sets the synced boolean to true.
//
s
etSynced sets the synced boolean to true.
func
(
c
*
Client
)
setSynced
()
{
func
(
c
*
Client
)
setSynced
()
{
c
.
mu
.
Lock
()
c
.
mu
.
Lock
()
defer
c
.
mu
.
Unlock
()
defer
c
.
mu
.
Unlock
()
c
.
synced
=
true
c
.
synced
=
true
}
}
// Synced return true if the clients has synced.
//
Has
Synced return true if the clients has synced.
func
(
c
*
Client
)
HasSynced
()
bool
{
func
(
c
*
Client
)
HasSynced
()
bool
{
c
.
mu
.
RLock
()
c
.
mu
.
RLock
()
defer
c
.
mu
.
RUnlock
()
defer
c
.
mu
.
RUnlock
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment