Version clusters - not endpoints yet

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-01-16 19:23:24 +01:00
parent cc87277820
commit 45f11f3276
3 changed files with 33 additions and 19 deletions

View File

@@ -0,0 +1,25 @@
package xds
func (c *Client) Nonce() string {
c.mu.RLock()
defer c.mu.RUnlock()
return c.nonce
}
func (c *Client) SetNonce(n string) {
c.mu.Lock()
defer c.mu.Unlock()
c.nonce = n
}
func (c *Client) Assignments() *assignment {
c.mu.RLock()
defer c.mu.RUnlock()
return c.assignments
}
func (c *Client) SetAssignments(a *assignment) {
c.mu.Lock()
defer c.mu.Unlock()
c.assignments = a
}