registry

package
v0.0.0-...-315a808 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRegisterCheck = func(ctx context.Context) error { return nil }
)

Functions

func CopyService

func CopyService(service *micro.Service) *micro.Service

CopyService make a copy of service

func CopyServices

func CopyServices(current []*micro.Service) []*micro.Service

CopyServices makes a copy of services

func Merge

func Merge(olist []*micro.Service, nlist []*micro.Service) []*micro.Service

Merge merges two lists of services and returns a new copy

func NewEtcdRegistry

func NewEtcdRegistry(opts ...Option) (micro.Registry, error)

func Remove

func Remove(old, del []*micro.Service) []*micro.Service

Remove removes services and returns a new copy

func Topic

func Topic(service string, version *micro.Version, node string) string

Topic 获取需要发送的主题

func Topics

func Topics(service string, version *micro.Version, node string) []string

Types

type Option

type Option func(*Options)

func WithAddress

func WithAddress(address []string) Option

func WithTLSConfig

func WithTLSConfig(config *tls.Config) Option

func WithTTL

func WithTTL(timeout int32) Option

WithTTL timeout with seconds

func WithTimeout

func WithTimeout(timeout int32) Option

WithTimeout timeout with seconds

type Options

type Options struct {
	TLSConfig *tls.Config
	Address   []string
	Timeout   time.Duration
	TTL       time.Duration
}

Directories

Path Synopsis
Package cache provides a registry cache
Package cache provides a registry cache

Jump to

Keyboard shortcuts

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