nacos

package
v0.0.0-...-6374fa3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr      []string `mapstructure:"addr"`
	Cluster   string   `mapstructure:"cluster" schema:"cluster"`
	Group     string   `mapstructure:"group" schema:"group"`
	Namespace string   `mapstructure:"namespace" schema:"namespace"`
	Weight    float64  `mapstructure:"weight" schema:"weight"`
	Username  string   `mapstructure:"username"`
	Password  string   `mapstructure:"password"`
	AppName   string   `mapstructure:"app_name" schema:"app_name"`
}

func (*Config) String

func (c *Config) String() string

type Registry

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

func BuildRegistryWithURL

func BuildRegistryWithURL(u url.URL) *Registry

func NewRegistry

func NewRegistry(c *Config) *Registry

func (Registry) Find

func (r Registry) Find(ctx context.Context, serviceName string) ([]discover.ServiceInfo, error)

func (Registry) Register

func (r Registry) Register(ctx context.Context, info discover.Service) (context.CancelFunc, error)

func (Registry) Watch

func (r Registry) Watch(ctx context.Context, serviceName string, update discover.Notify) error

Jump to

Keyboard shortcuts

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