Commit 246b8ac8 authored by Miek Gieben's avatar Miek Gieben

document better

Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
parent c8da9cd2
...@@ -9,12 +9,16 @@ import ( ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment