discovery

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Zlib Imports: 2 Imported by: 0

README

服务发现

client 根据scheme区分 1 如果scheme同一个,在 reslover会保存最后一个,建议不要重复创建 2 如业务有多个需要,可以改变scheme定义自己

如果是连不同的机群,client请定义好scheme来区分

外面请求地址 // https://github.com/grpc/grpc/blob/master/doc/naming.md // scheme://authority//endpoints

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Services

type Services struct {
	Services map[string]service.Base
	// contains filtered or unexported fields
}

func NewServices

func NewServices() *Services

func (*Services) Add

func (s *Services) Add(name string, base service.Base)

func (*Services) Del

func (s *Services) Del(name string)

func (*Services) Get

func (s *Services) Get(name string) (service.Base, bool)

Directories

Path Synopsis
*
*

Jump to

Keyboard shortcuts

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