discovery

package
v5.1.6-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discoverier

type Discoverier interface {
	Connect() error
	Close() error
	Fetch() ([]*v1.RbdEndpoint, error)
	Watch()
}

Discoverier is the interface that wraps the required methods to gather information about third-party service endpoints.

func NewDiscoverier

func NewDiscoverier(cfg *model.ThirdPartySvcDiscoveryCfg,
	updateCh *channels.RingChannel,
	stopCh chan struct{}) (Discoverier, error)

NewDiscoverier creates a new Discoverier.

func NewEtcd

func NewEtcd(cfg *model.ThirdPartySvcDiscoveryCfg,
	updateCh *channels.RingChannel,
	stopCh chan struct{}) Discoverier

NewEtcd creates a new Discorvery which implemeted by etcd.

type Event

type Event struct {
	Type EventType
	Obj  interface{}
}

Event holds the context of an event.

type EventType

type EventType string

EventType type of event

const (
	// CreateEvent event associated with new objects in a service discovery center
	CreateEvent EventType = "CREATE"
	// UpdateEvent event associated with an object update in a service discovery center
	UpdateEvent EventType = "UPDATE"
	// DeleteEvent event associated when an object is removed from a service discovery center
	DeleteEvent EventType = "DELETE"
	// UnhealthyEvent -
	UnhealthyEvent EventType = "UNHEALTHY"
	// HealthEvent -
	HealthEvent EventType = "HEALTH"
)

Jump to

Keyboard shortcuts

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