registry

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultWeight = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// ServiceName will be set in hertz by default
	ServiceName string
	// Addr will be set in hertz by default
	Addr net.Addr
	// Weight will be set in hertz by default
	Weight int
	// extend other infos with Tags.
	Tags map[string]string
}

Info is used for registry. The fields are just suggested, which is used depends on design.

type Registry

type Registry interface {
	Register(info *Info) error
	Deregister(info *Info) error
}

Registry is extension interface of service registry.

var NoopRegistry Registry = &noopRegistry{}

NoopRegistry is an empty implement of Registry

Jump to

Keyboard shortcuts

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