discoverd

package
v0.0.0-...-16f4573 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2015 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShutdownRestServer

func ShutdownRestServer() bool

func StartRestServer

func StartRestServer(addr string, repo *msd.DiscoverdRepo, logger *log.Logger, shutdownCh chan struct{})

Types

type Context

type Context struct {
	RestAddr   string
	Serf       *serf.Serf
	ServiceTTL int
	Logger     *log.Logger
	ShutdownCh chan struct{}
}

type Discoverd

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

func Create

func Create(restAddr string, serviceTTL int, serf *serf.Serf, logOutput io.Writer) *Discoverd

func (*Discoverd) AddRouter

func (s *Discoverd) AddRouter(name string, addr string, mss []string)

func (*Discoverd) ListMicroApps

func (s *Discoverd) ListMicroApps() []api.MicroApp

func (*Discoverd) ListRouters

func (s *Discoverd) ListRouters() []api.Router

func (*Discoverd) RemoveRouter

func (s *Discoverd) RemoveRouter(addr string)

func (*Discoverd) RemoveRouterByHost

func (s *Discoverd) RemoveRouterByHost(name string)

func (*Discoverd) Shutdown

func (d *Discoverd) Shutdown()

func (*Discoverd) ShutdownCh

func (d *Discoverd) ShutdownCh() <-chan struct{}

ShutdownCh returns a channel that can be used to wait for discoverd to shutdown.

func (*Discoverd) UpdateRouters

func (s *Discoverd) UpdateRouters(rs []api.Router)

Directories

Path Synopsis
util

Jump to

Keyboard shortcuts

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