Documentation ¶
Index ¶
- Constants
- func BuildAddress(ip string, port uint32) core.Address
- func ConvertAddressToCidr(addr string) *core.CidrRange
- func GetByAddress(listeners []*xdsapi.Listener, addr string) *xdsapi.Listener
- func GetNetworkEndpointAddress(n *model.NetworkEndpoint) core.Address
- func GogoDurationToDuration(d *types.Duration) time.Duration
- func MessageToStruct(msg proto.Message) *types.Struct
- func SortVirtualHosts(hosts []route.VirtualHost)
Constants ¶
const (
// BlackHoleCluster to catch traffic from routes with unresolved clusters. Traffic arriving here goes nowhere.
BlackHoleCluster = "BlackHoleCluster"
)
Variables ¶
This section is empty.
Functions ¶
func BuildAddress ¶
BuildAddress returns a SocketAddress with the given ip and port.
func ConvertAddressToCidr ¶
ConvertAddressToCidr converts from string to CIDR proto
func GetByAddress ¶
GetByAddress returns a listener by its address TODO(mostrowski): consider passing map around to save iteration.
func GetNetworkEndpointAddress ¶
func GetNetworkEndpointAddress(n *model.NetworkEndpoint) core.Address
GetNetworkEndpointAddress returns an Envoy v2 API `Address` that represents this NetworkEndpoint
func GogoDurationToDuration ¶
GogoDurationToDuration converts from gogo proto duration to time.duration
func MessageToStruct ¶
MessageToStruct converts from proto message to proto Struct
func SortVirtualHosts ¶
func SortVirtualHosts(hosts []route.VirtualHost)
SortVirtualHosts sorts a slice of virtual hosts by name.
Envoy computes a hash of the listener which is affected by order of elements in the filter. Therefore we sort virtual hosts by name before handing them back so the ordering is stable across HTTP Route Configs.
Types ¶
This section is empty.