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