mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
@@ -9,11 +9,15 @@ import (
|
||||
corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
|
||||
)
|
||||
|
||||
// SocketAddress holds a corepb.SocketAddress.
|
||||
type SocketAddress struct {
|
||||
*corepb.SocketAddress
|
||||
}
|
||||
|
||||
// Address returns the address from s.
|
||||
func (s *SocketAddress) Address() net.IP { return net.ParseIP(s.GetAddress()) }
|
||||
|
||||
// Port returns the port from s.
|
||||
func (s *SocketAddress) Port() uint16 { return uint16(s.GetPortValue()) }
|
||||
|
||||
type assignment struct {
|
||||
|
||||
Reference in New Issue
Block a user