endpoints

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package endpoints provides kubernetes Endpoint IP retrieval

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(ctx context.Context, c *k8s.Client, changes chan error, namespace string) error

Watch watches a namespace and returns a nil error on the provided channel when a change occurs. If an error occurs, the error will be sent down the channel and the watch will terminate.

Types

type Endpoints

type Endpoints struct {

	// Addresses is the list of IP addresses for the Endpoints
	Addresses []string

	// NodeAddresses is the list of Node addresses on which the Endpoints run
	NodeAddresses []string
}

Endpoints describes the set of Endpoints for a Service as well as the addresses of the Nodes on which those Endpoints run

func Get

func Get(ctx context.Context, c *k8s.Client, epNamespace, epName string) (ret Endpoints, err error)

Get retrieves the IP addresses for a named endpoint in a given namespace. If the namespace is empty, the `default` namespace will be used.

Jump to

Keyboard shortcuts

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