Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-01-19 09:14:09 +01:00
parent 894ec68487
commit 64d0cfba0c
6 changed files with 20 additions and 14 deletions

View File

@@ -227,17 +227,17 @@ func (c *Client) receive(stream adsStream) error {
// Select returns an address that is deemed to be the correct one for this cluster. The returned
// boolean indicates if the cluster exists.
func (c *Client) Select(cluster string) (*SocketAddress, bool) {
func (c *Client) Select(cluster string, ignore bool) (*SocketAddress, bool) {
if cluster == "" {
return nil, false
}
return c.assignments.Select(cluster)
return c.assignments.Select(cluster, ignore)
}
// All returns all endpoints.
func (c *Client) All(cluster string) ([]*SocketAddress, bool) {
func (c *Client) All(cluster string, ignore bool) ([]*SocketAddress, bool) {
if cluster == "" {
return nil, false
}
return c.assignments.All(cluster)
return c.assignments.All(cluster, ignore)
}