consul

package
v0.0.0-...-c8fbfac Latest Latest
Warning

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

Go to latest
Published: May 14, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocalIP

func LocalIP() (net.IP, error)

func NewClient

func NewClient(addr, token, datacenter string) (*api.Client, error)

func WatchServices

func WatchServices(client *api.Client, service string, tag string, updates chan []ServiceAddress) (stop chan bool)

func WatchTree

func WatchTree(client *api.Client, prefix string, notifications chan bool) (results map[string]string, stop chan bool, err error)

Types

type Registry

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

func NewRegistry

func NewRegistry(c_addr, c_token, c_dtctr string) (*Registry, error)

func (*Registry) Register

func (r *Registry) Register(name string, ip_s string, port int, check_url string, tags []string) (service_id string, err error)

func (*Registry) Registered

func (r *Registry) Registered(service_id string) (bool, error)

func (*Registry) Unregister

func (r *Registry) Unregister(service_id string) error

type ServiceAddress

type ServiceAddress struct {
	Host string
	Port int
}

Jump to

Keyboard shortcuts

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