util

package
v0.0.0-...-fd0897c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAddress

func BuildAddress(ip string, port uint32) core.Address

BuildAddress returns a SocketAddress with the given ip and port.

func BuildProtoStruct

func BuildProtoStruct(value interface{}) *types.Struct

BuildProtoStruct builds a proto.Struct with the given value JSON encoded into a field called "value" in the struct.

func ConvertAddressToCidr

func ConvertAddressToCidr(addr string) *core.CidrRange

ConvertAddressToCidr converts from string to CIDR proto

func ConvertGogoDurationToDuration

func ConvertGogoDurationToDuration(d *types.Duration) time.Duration

ConvertGogoDurationToDuration converts from gogo proto duration to time.duration

func GetByAddress

func GetByAddress(listeners []*xdsapi.Listener, addr string) *xdsapi.Listener

GetByAddress returns a listener by its address TODO(mostrowski): consider passing map around to save iteration.

func MessageToStruct

func MessageToStruct(msg proto.Message) *types.Struct

MessageToStruct converts from proto message to proto Struct

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL