discovery

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, baseURL string, n *Machine) (bool, error)

Add adds a Machine to a discovery url.

func Delete

func Delete(ctx context.Context, baseURL, id string) (bool, error)

Delete remove a given machine from a discovery url.

func Value

func Value(ctx context.Context, baseURL, key string) (*store.Event, error)

Value reads a value from a discovery url.

Types

type Machine

type Machine struct {
	client.Member
}

Machine represents a cluster member extracted from a discovery url.

func NewDiscoveryNode

func NewDiscoveryNode(namedPeerURLs string, clientPort int) (*Machine, error)

NewDiscoveryNode parses a discovery URL machine value into a Machine.

func (*Machine) NamedPeerURLs

func (n *Machine) NamedPeerURLs() []string

NamedPeerURLs returnes a slace of name=http://domain:port values for a Machine.

Jump to

Keyboard shortcuts

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