utils

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindContainerPort

func FindContainerPort(pod *api.Pod, svcPort *api.ServicePort) int

FindContainerPort Find the container's port number of a known servicePort Search criteria: 1. svcPort.TargetPort is a number: this is the right container's port 2. svcPort.TargetPort is a named port (not a number): find a container's port with that name and use its ContainerPort If targetPort is neither a valid port number nor a declared named port, return zero which means that the port was not found

func FindServicePort

func FindServicePort(svc *api.Service, servicePort string) *api.ServicePort

FindServicePort ...

Types

type Endpoint

type Endpoint struct {
	IP        string
	Port      int
	TargetRef string
}

Endpoint ...

func CreateEndpoints

func CreateEndpoints(cache types.Cache, svc *api.Service, svcPort *api.ServicePort) (ready, notReady []*Endpoint, err error)

CreateEndpoints ...

func CreateSvcEndpoint

func CreateSvcEndpoint(svc *api.Service, svcPort *api.ServicePort) (endpoint *Endpoint, err error)

CreateSvcEndpoint ...

func (*Endpoint) String

func (e *Endpoint) String() string

Jump to

Keyboard shortcuts

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