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: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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