nacos

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupName = "DEFAULT_GROUP"
	Cluster   = "DEFAULT"
)

Variables

This section is empty.

Functions

func NewServerDiscovery

func NewServerDiscovery(option Config) servicediscovery.IServiceDiscovery

func UseServiceDiscovery

func UseServiceDiscovery(serviceCollection *dependencyinjection.ServiceCollection)

Types

type Config

type Config struct {
	ENV         *abstractions.HostEnvironment
	Url         string `mapstructure:"url"`
	Port        uint64 `mapstructure:"port"`
	NamespaceId string `mapstructure:"namespace"`
	GroupName   string `mapstructure:"group_name"`
	ClusterName string `mapstructure:"cluster_name"`
}

type Registrar

type Registrar struct {
	// contains filtered or unexported fields
}

func (Registrar) Destroy

func (register Registrar) Destroy() error

func (Registrar) GetAllInstances

func (register Registrar) GetAllInstances(serviceName string) []servicediscovery.ServiceInstance

func (Registrar) GetHealthyInstances

func (register Registrar) GetHealthyInstances(serviceName string) []servicediscovery.ServiceInstance

func (Registrar) GetName

func (register Registrar) GetName() string

func (*Registrar) Register

func (register *Registrar) Register() error

func (Registrar) Unregister

func (register Registrar) Unregister() error

func (Registrar) Update

func (register Registrar) Update() error

Jump to

Keyboard shortcuts

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