discover

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: ISC Imports: 4 Imported by: 0

README

Consul based service discovery for gRPC

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithResolver

func WithResolver(addr, tag string) grpc.DialOption

Types

type Resolve

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

func (Resolve) Resolve

func (r Resolve) Resolve(service string) (naming.Watcher, error)

Resolve creates a Watcher for target

type Watch

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

func (Watch) Close

func (w Watch) Close()

Close watcher

func (*Watch) Next

func (w *Watch) Next() ([]*naming.Update, error)

Next blocks until an update or error happens. It may return one or more updates. The first call should get the full set of the results. It should return an error if and onfy if Watcher cannot recover.

Jump to

Keyboard shortcuts

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