mirror of
https://github.com/coredns/coredns.git
synced 2025-11-09 13:32:16 -05:00
Return all records for SRV queries
Return all SRV records and assume the client is smart enough to make the call. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -23,7 +23,6 @@ package xds
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -228,9 +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) (net.IP, uint16, bool) {
|
||||
func (c *Client) Select(cluster string) (*SocketAddress, bool) {
|
||||
if cluster == "" {
|
||||
return nil, 0, false
|
||||
return nil, false
|
||||
}
|
||||
return c.assignments.Select(cluster)
|
||||
}
|
||||
|
||||
// All returns all endpoints.
|
||||
func (c *Client) All(cluster string) ([]*SocketAddress, bool) {
|
||||
if cluster == "" {
|
||||
return nil, false
|
||||
}
|
||||
return c.assignments.All(cluster)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user