monitor

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByID

type ByID []client.ServiceInstance

ByID sorts by ID

func (ByID) Len

func (a ByID) Len() int

Len of the array

func (ByID) Less

func (a ByID) Less(i, j int) bool

Less i and j

func (ByID) Swap

func (a ByID) Swap(i, j int)

Swap i and j

type ControllerConfig

type ControllerConfig struct {
	Client       client.Client
	Listeners    []ControllerListener
	PollInterval time.Duration
}

ControllerConfig options

type ControllerListener

type ControllerListener interface {
	RuleChange([]rules.Rule) error
}

ControllerListener is notified of changes to controller

type Monitor

type Monitor interface {
	Start() error
	Stop() error
}

Monitor a source

func NewController

func NewController(conf ControllerConfig) Monitor

NewController instantiates a new instance

func NewRegistry

func NewRegistry(conf RegistryConfig) Monitor

NewRegistry instantiates new instance

type RegistryConfig

type RegistryConfig struct {
	PollInterval   time.Duration
	RegistryClient client.Discovery
	Listeners      []RegistryListener
}

RegistryConfig options

type RegistryListener

type RegistryListener interface {
	CatalogChange([]client.ServiceInstance) error
}

RegistryListener is notified of changes to the registry catalog

Jump to

Keyboard shortcuts

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