consul

package
v0.0.0-...-a08e549 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2015 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientResolver

func NewClientResolver(httpAddr, dnsAddr string, config *quantum.ConnConfig) quantum.ClientResolver

NewClientResolver creates a consul client resolver

func NewRegistrator

func NewRegistrator(httpAddr string, lgr lager.Lager) quantum.Registrator

NewRegistrator creates a Registrator

Types

type ClientResolver

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

ClientResolver is a client resolver that leverages Consul's service discovery.

func (*ClientResolver) Resolve

func (cr *ClientResolver) Resolve(request quantum.ResolveRequest) (quantum.ClientConn, error)

Resolve resolves a ClientConn using a ResolveRequest

type Registrator

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

Registrator uses consul to implement quantum.Registrator

func (*Registrator) Deregister

func (r *Registrator) Deregister() error

Deregister deregisters our serviceIDs with Consul

func (*Registrator) Register

func (r *Registrator) Register(port int, reg quantum.Registry) error

Register will register types with Consul

Jump to

Keyboard shortcuts

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