registry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetaWeight  = "weight"
	MetaCluster = "cluster"
	MetaZone    = "zone"
	MetaColor   = "color"
)

metadata common key

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry interface {
	Register(ctx context.Context, info *ServiceInfo) error
	DeRegister(ctx context.Context, info *ServiceInfo) error
	Close()
}

type ServiceInfo

type ServiceInfo struct {
	// Service Name
	Name string `json:"name"`
	// Service Scheme, http/grpc
	Scheme string `json:"schema"`
	// Service Addr
	Addr string `json:"addr"`
	// Metadata is the information associated with Addr, which may be used
	// to make load balancing decision
	Metadata map[string]string `json:"metadata"`
	// Region is region
	Region string `json:"region"`
	// Zone is IDC
	Zone string `json:"zone"`
	// prod/pre/test/dev
	Env string `json:"env"`
	// Service Version
	Version string `json:"version"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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