ambassador

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 7 Imported by: 0

README

Ambassador

Consul gRPC resolver for load balancing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuilder

func NewBuilder(addr, tag, datacenter string) resolver.Builder

NewBuilder return Builder with service name

Types

type Address

type Address = string

type Builder

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

Builder is the implementaion of grpc.naming.Resolver

func (*Builder) Build

func (*Builder) Scheme

func (b *Builder) Scheme() string

type Resolver

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

func (*Resolver) Close

func (r *Resolver) Close()

func (*Resolver) ResolveNow

func (r *Resolver) ResolveNow(option resolver.ResolveNowOption)

It's just a hint, resolver can ignore this if it's not necessary.

type Service

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

func NewService

func NewService(name string, host string, port int, target string, ttl int) (*Service, error)

func (*Service) Deregister

func (s *Service) Deregister() error

func (*Service) Register

func (s *Service) Register() error

type Watcher

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

func NewWatcher

func NewWatcher(consul, service, dc, tag string) (*Watcher, error)

func (*Watcher) Run

func (w *Watcher) Run(ctx context.Context) error

func (*Watcher) Stop

func (w *Watcher) Stop()

func (*Watcher) Watch

func (w *Watcher) Watch() chan []Address

Directories

Path Synopsis
example
pb

Jump to

Keyboard shortcuts

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