consul

package
v1.11.9 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

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(watchURL string, service string)

type Options

type Options struct {
	// Watch is what to url to match with the consul service
	// exp. { "http://beta.google.com:8080/notify" : "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