endpoints

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsulRegisterEnabledAnnotation string = "consul.register/enabled"
)

These are valid annotations names which are take into account. "ConsulRegisterEnabledAnnotation" is a name of annotation key for `enabled` option.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller describes the attributes that are uses by Controller

func (*Controller) Clean

func (c *Controller) Clean() error

Clean checks Consul services and remove them if service does not appear in K8S cluster

func (*Controller) Sync

func (c *Controller) Sync() error

Sync synchronizes services between Consul and K8S cluster

func (*Controller) Watch

func (c *Controller) Watch()

Watch watches events in K8S cluster

type FactoryAdapter

type FactoryAdapter interface {
	Watch()
	Sync() error
	Clean() error
}

FactoryAdapter has a method to work with Controller resources.

func New

func New(clientset *kubernetes.Clientset, consulInstance consul.Adapter, cfg *config.Config, namespace string) FactoryAdapter

New creates an instance of controller

Jump to

Keyboard shortcuts

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