kubernetes

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package kubernetes provides access to the Kubernetes API

Package kubernetes provides access to the Kubernetes API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetEndpoints(service string, namespace string) (*v1.Endpoints, error)
}

Client interface that allows us to mock calls to the Kubernetes API

func NewClient

func NewClient() Client

NewClient initiates connection to the kubernetes API See https://github.com/kubernetes/client-go/blob/master/examples/in-cluster/main.go

type ClientConfig

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

ClientConfig holds the kubernetes session for when communicating with the kubernetes API

func (ClientConfig) GetEndpoints

func (c ClientConfig) GetEndpoints(service string, namespace string) (*v1.Endpoints, error)

GetEndpoints gets the endpoints from the kubernetes API See https://github.com/kubernetes/client-go

type EndpointsController

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

EndpointsController provides access to the kubernetes endpoints functions

func NewEndpointsController

func NewEndpointsController(client Client) *EndpointsController

NewEndpointsController stores our real or mocked kubernetes client object

func (EndpointsController) GetEndpoints

func (e EndpointsController) GetEndpoints(service string, namespace string) (*v1.Endpoints, error)

GetEndpoints is a wrapper function around the kubernetes client. If there is any manipulation or filtering of the kubernetes types or data, it should be done here.

Jump to

Keyboard shortcuts

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