utils

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationFromProto

func DurationFromProto(p *types.Duration) (time.Duration, error)

DurationFromProto converts a Duration to a time.Duration. DurationFromProto returns an error if the Duration is invalid or is too large to be represented in a time.Duration.

func DurationProto

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

DurationProto converts a time.Duration to a Duration.

func GetHostForUpstream

func GetHostForUpstream(us *gloov1.Upstream) (string, error)

func GetHostsForUpstream

func GetHostsForUpstream(us *gloov1.Upstream) ([]string, error)

func GetLabelsForUpstream

func GetLabelsForUpstream(us *gloov1.Upstream) map[string]string

func GetNamespaceForUpstream

func GetNamespaceForUpstream(us *gloov1.Upstream) string

func GetPortForUpstream

func GetPortForUpstream(us *gloov1.Upstream) (uint32, error)

func PodsForSelector

func PodsForSelector(selector *v1.PodSelector, upstreams gloov1.UpstreamList, allPods customkube.PodList) (customkube.PodList, error)

func PodsForUpstreams

func PodsForUpstreams(upstreams gloov1.UpstreamList, allPods customkube.PodList) (customkube.PodList, error)

func SanitizeName

func SanitizeName(name string) string

func SubsetName

func SubsetName(labels map[string]string) string

func UpstreamsForSelector

func UpstreamsForSelector(selector *v1.PodSelector, allUpstreams gloov1.UpstreamList) (gloov1.UpstreamList, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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