nacos

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientHost

type ClientHost struct {
	Valid      bool        `json:"valid"`
	Marked     bool        `json:"marked"`
	InstanceId string      `json:"instanceId"`
	Port       int         `json:"port"`
	Ip         string      `json:"ip"`
	Weight     float64     `json:"weight"`
	Metadata   interface{} `json:"metadata"`
}

type Config

type Config struct {
	ServerIp   string `json:"server_ip"`
	ServerPort int    `json:"server_port"`
}

func (*Config) Register

func (c *Config) Register(serviceIp string, servicePort int, serviceName string) error

func (*Config) Resolve

func (c *Config) Resolve(serviceName string) string

Resolve 返回http://ip:port

type Result

type Result struct {
	Dom             string       `json:"dom"`
	CacheMillis     int          `json:"cacheMillis"`
	UseSpecifiedURL bool         `json:"useSpecifiedURL"`
	Checksum        string       `json:"checksum"`
	LastRefTime     int          `json:"lastRefTime"`
	Env             string       `json:"env"`
	Clusters        string       `json:"clusters"`
	Hosts           []ClientHost `json:"hosts"`
}

Jump to

Keyboard shortcuts

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