naming

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PREFIX uses here to differentiate between denny etcd prefix and other service prefix
	// in etcd directory/files
	Prefix = "_DENNY_"
)

Variables

This section is empty.

Functions

func DefaultBalancePolicy added in v1.0.2

func DefaultBalancePolicy() grpc.DialOption

DefaultBalancePolicy returns default grpc service config which required by new grpc API so client does not have to supply json config everytime

func Exist added in v1.0.2

func Exist(l []resolver.Address, addr string) bool

func Remove added in v1.0.2

func Remove(s []resolver.Address, addr string) ([]resolver.Address, bool)

Types

type Registry

type Registry interface {
	Register(addr string, ttl int) error
	UnRegister(addr string) error
	Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
	Scheme() string
	SvcName() string
}

Registry is based interface, which is composed of grpc resolver.Builder, resolver.Resolver and also contains method to register and unregister from naming storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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