kubernetes

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EndpointsCacheResyncPeriod is the period in which we do a full resync of the endpoints cache.
	EndpointsCacheResyncPeriod = time.Duration(60) * time.Second

	// PodCacheResyncPeriod is the period in which we do a full resync of the pod cache.
	PodCacheResyncPeriod = time.Duration(60) * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter for Kubernetes Service Discovery.

func New

func New(config Config) (*Adapter, error)

New creates and starts a new Kubernetes Service Discovery adapter.

func (*Adapter) ListInstances

func (a *Adapter) ListInstances() ([]*api.ServiceInstance, error)

ListInstances queries for the list of service instances currently registered.

func (*Adapter) ListServiceInstances

func (a *Adapter) ListServiceInstances(serviceName string) ([]*api.ServiceInstance, error)

ListServiceInstances queries for the list of service instances currently registered for the given service.

func (*Adapter) ListServices

func (a *Adapter) ListServices() ([]string, error)

ListServices queries for the list of services for which instances are currently registered.

func (*Adapter) Start

func (a *Adapter) Start() error

Start synchronizing the Kubernetes adapter.

func (*Adapter) Stop

func (a *Adapter) Stop() error

Stop synchronizing the Kubernetes adapter.

type Config

type Config struct {
	kubepkg.Config

	// Namespace to target for Kubernetes API calls.
	// If left empty, defaults to "default" namespace.
	Namespace auth.Namespace

	// Client to be used by the Kubernetes adapter.
	// If no client is provided, then a client is created
	// according the specified URL/Token/Namespace, if provided,
	// or from the local service account, if running within a Kubernetes pod.
	Client kubernetes.Interface
}

Config stores configurable attributes of the Kubernetes adapter.

Jump to

Keyboard shortcuts

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