k8s

package
v0.0.0-...-6780f68 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeSet

type ChangeSet struct {
	Added   map[string]apiv1.Service
	Removed map[string]apiv1.Service
}

ChangeSet holds the beofre and after set of k8s services.

type K8S

type K8S struct {
	Client   corev1.CoreV1Interface
	Services *Services
}

K8S defines the kubernetes API client

func New

func New() (*K8S, error)

New is the constructor for the K8S struct.

type Services

type Services struct {
	// contains filtered or unexported fields
}

Services maintains an up to date list of available kubernetes services.

func (*Services) Map

func (services *Services) Map() map[string]apiv1.Service

Map returns the current map of running services.

func (*Services) Stop

func (services *Services) Stop()

Stop ends the serviceWatcher goroutine.

func (*Services) Watch

func (services *Services) Watch(delay time.Duration) chan ChangeSet

Watch starts the service watcher goroutine. 'delay' is the amount of time to wait between updates to the services map.

Jump to

Keyboard shortcuts

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