consul

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulWatcher

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

func NewConsulWatcher

func NewConsulWatcher(o Options) *ConsulWatcher

func (*ConsulWatcher) LookupRoutes

func (watcher *ConsulWatcher) LookupRoutes(ctx context.Context, host string) ([]xresolver.Route, error)

func (*ConsulWatcher) MonitorEvent

func (watcher *ConsulWatcher) MonitorEvent(e monitor.Event)

func (*ConsulWatcher) WatchService

func (watcher *ConsulWatcher) WatchService(url string, service string)

type Options

type Options struct {
	// Watch is what to url to match with the consul service
	// exp. { "beta.google.com" : "caduceus" }
	Watch map[string]string `json:"watch"`

	Logger log.Logger `json:"-"`
}

Jump to

Keyboard shortcuts

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