consul

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 9 Imported by: 0

README

GRPC Consul resolver

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConsulResolver

func InitConsulResolver(consul *api.Client, refreshTime *time.Duration)

func InitServices

func InitServices(consul *api.Client, refreshTime *time.Duration)

func ResetResolver

func ResetResolver()

Types

type Service

type Service struct {
	Key       string
	Name      string
	Tags      []string
	Health    healthFilter
	Addresses []resolver.Address
	LastIndex uint64
}

type Services

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

func (*Services) Add

func (srv *Services) Add(name string, tags []string, health healthFilter) *Service

func (*Services) Clear

func (srv *Services) Clear()

func (*Services) Find

func (srv *Services) Find(key string) *Service

Jump to

Keyboard shortcuts

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