Help us shape the future of Go! Take the 2026 Go Developer Survey

registry

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 1 Imported by: 98

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