mirror of
https://github.com/coredns/coredns.git
synced 2025-10-31 18:23:13 -04:00
add support unix socket for GRPC (#5943)
This commit is contained in:
@@ -33,6 +33,14 @@ func HostPortOrFile(s ...string) ([]string, error) {
|
||||
var servers []string
|
||||
for _, h := range s {
|
||||
trans, host := Transport(h)
|
||||
if len(host) == 0 {
|
||||
return servers, fmt.Errorf("invalid address: %q", h)
|
||||
}
|
||||
|
||||
if trans == transport.UNIX {
|
||||
servers = append(servers, trans+"://"+host)
|
||||
continue
|
||||
}
|
||||
|
||||
addr, _, err := net.SplitHostPort(host)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user