discovery

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartWatchServices

func StartWatchServices(param *ServiceWactchParam)

启动一个etcd 监听,服务发生变动都会触发通知 go StartWatchServices() basePath ="/services" mod 是环境 dev etcdAddrss etcd地址列表

Types

type ServiceData

type ServiceData struct {
	MethodType   string   `json:"methodType,omitempty" `
	Name         string   `json:"name,omitempty" `
	FuncName     string   `json:"funcName,omitempty" `
	Path         string   `json:"path,omitempty" `
	Method       string   `json:"method,omitempty" `
	Auth         string   `json:"auth,omitempty" `
	Perms        []string `json:"perms,omitempty"`
	ProductLines []string `json:"productLines,omitempty"`
	Funcs        []string `json:"funcs,omitempty" `
	Hosts        []string `json:"hosts,omitempty" `
	AppName      string   `json:"appName"`
}

type ServiceWactchParam

type ServiceWactchParam struct {
	BasePath   string
	Mod        string
	EtcdAddrss []string
	Options    *store.Config
	CallBack   func(map[string]ServiceData)
}

Jump to

Keyboard shortcuts

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