microservices

package
v0.0.0-...-2ec961a Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NacosClass

type NacosClass struct {
	Ini        NacosIni
	IsClient   bool
	NameClient naming_client.INamingClient
}

func NewNacosServer

func NewNacosServer() *NacosClass

func (*NacosClass) CreatNacosClient

func (that *NacosClass) CreatNacosClient() bool

func (*NacosClass) GetIPList

func (that *NacosClass) GetIPList(servername, groupname string, cl_list []string) ([]model.Instance, error)

func (*NacosClass) GetIPListDefault

func (that *NacosClass) GetIPListDefault(servername string) ([]model.Instance, error)

func (*NacosClass) GetOneHealth

func (that *NacosClass) GetOneHealth(servername, groupname string, cl_list []string) *model.Instance

cl_list=[]string{"DEFAULT"}

func (*NacosClass) GetOneHealthDefault

func (that *NacosClass) GetOneHealthDefault(servername string) *model.Instance

cl_list=[]string{"DEFAULT"}

func (*NacosClass) GetServerList

func (that *NacosClass) GetServerList(groupname string) (model.ServiceList, error)

func (*NacosClass) RegisterServer

func (that *NacosClass) RegisterServer() bool

type NacosIni

type NacosIni struct {
	RegisterInstance struct {
		ServerIP    string `json:"server_ip"`
		ServicePort uint64 `json:"service_port"`
		ServiceName string `json:"service_name"`
		GroupName   string `json:"group_name"`
		ClusterName string `json:"cluster_name"`
	} `json:"register_instance"`
	ServerConfigs struct {
		IpAddr string `json:"ip_addr"`
		Port   uint64 `json:"port"`
	} `json:"server_configs"`
	ClientConfig struct {
		NamespaceId string `json:"namespace_id"`
		UserName    string `json:"user_name"`
		PassWord    string `json:"pass_word"`
	} `json:"client_config"`
}

Jump to

Keyboard shortcuts

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