Documentation
¶
Index ¶
- Constants
- func BuildAddress(ip string, port uint32) core.Address
- func BuildProtoStruct(value interface{}) *types.Struct
- func ConvertAddressToCidr(addr string) *core.CidrRange
- func GetByAddress(listeners []*xdsapi.Listener, addr string) *xdsapi.Listener
- 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 BuildProtoStruct ¶
BuildProtoStruct builds a proto.Struct with the given value JSON encoded into a field called "value" in the struct.
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 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.