discoverapi

package
v0.7.0-dev.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// NodeDiscovery represents Node join/leave events provided by discovery
	NodeDiscovery = iota + 1
	// DatastoreConfig represents an add/remove datastore event
	DatastoreConfig
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DatastoreConfigData

type DatastoreConfigData struct {
	Scope    string
	Provider string
	Address  string
	Config   interface{}
}

DatastoreConfigData is the data for the datastore update event message

type Discover

type Discover interface {
	// DiscoverNew is a notification for a new discovery event, Example:a new node joining a cluster
	DiscoverNew(dType DiscoveryType, data interface{}) error

	// DiscoverDelete is a notification for a discovery delete event, Example:a node leaving a cluster
	DiscoverDelete(dType DiscoveryType, data interface{}) error
}

Discover is an interface to be implemented by the componenet interested in receiving discover events like new node joining the cluster or datastore updates

type DiscoveryType

type DiscoveryType int

DiscoveryType represents the type of discovery element the DiscoverNew function is invoked on

type NodeDiscoveryData

type NodeDiscoveryData struct {
	Address string
	Self    bool
}

NodeDiscoveryData represents the structure backing the node discovery data json string

Jump to

Keyboard shortcuts

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