nacos

package
v0.0.0-...-18f0be3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

author: JGZ time: 2021-01-28 10:26

author: JGZ time: 2021-01-28 15:51

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instancer

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

func NewInstancer

func NewInstancer(client naming_client.INamingClient, logger log.Logger, service string, groupName string, clusters []string) *Instancer

func (*Instancer) Deregister

func (s *Instancer) Deregister(ch chan<- sd.Event)

func (*Instancer) Register

func (s *Instancer) Register(ch chan<- sd.Event)

func (*Instancer) Stop

func (s *Instancer) Stop()

type Param

type Param struct {
	Ip          string            `param:"ip"`          //required
	Port        uint64            `param:"port"`        //required
	ServiceName string            `param:"serviceName"` //required
	Weight      float64           `param:"weight"`      //required,it must be lager than 0
	Metadata    map[string]string `param:"metadata"`    //optional
	ClusterName string            `param:"clusterName"` //optional,default:DEFAULT
	GroupName   string            `param:"groupName"`   //optional,default:DEFAULT_GROUP
}

type Registrar

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

func NewRegistrar

func NewRegistrar(client naming_client.INamingClient, param Param, logger log.Logger) *Registrar

func (*Registrar) Deregister

func (p *Registrar) Deregister()

Deregister implements sd.Registrar interface.

func (*Registrar) Register

func (p *Registrar) Register()

Register implements sd.Registrar interface.

Jump to

Keyboard shortcuts

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