kubernetes

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultKubeEventResyncInterval is the default resync interval for k8s events
	DefaultKubeEventResyncInterval = 30 * time.Second
)

Variables

This section is empty.

Functions

func GetHostnamesForService added in v0.3.0

func GetHostnamesForService(service *corev1.Service) []string

GetHostnamesForService returns a list of hostnames over which the service can be accessed within the local cluster.

func GetKubernetesEventHandlers

func GetKubernetesEventHandlers(informerName string, providerName string, announcements chan interface{}, shouldObserve observeFilter) cache.ResourceEventHandlerFuncs

GetKubernetesEventHandlers creates Kubernetes events handlers.

func GetServiceFromHostname added in v0.3.0

func GetServiceFromHostname(host string) string

GetServiceFromHostname returns the service name from its hostname

Types

type Event

type Event struct {
	Type  EventType
	Value interface{}
}

Event is the combined type and actual object we received from Kubernetes

type EventType

type EventType int

EventType is the type of event we have received from Kubernetes

const (
	// CreateEvent is a type of a Kubernetes API event.
	CreateEvent EventType = iota + 1

	// UpdateEvent is a type of a Kubernetes API event.
	UpdateEvent

	// DeleteEvent is a type of a Kubernetes API event.
	DeleteEvent
)

Jump to

Keyboard shortcuts

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