nacos

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToProviderInstance added in v0.4.0

func ToProviderInstance(nacosInstances []model.Instance) []provider.Instancer

Types

type File

type File struct {
	DataID  string
	Group   string
	Content string
}

type NacosProvider

type NacosProvider struct {
	OnChanged provider.ChangeFunc
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(options Options) (*NacosProvider, error)

func (*NacosProvider) ConfigOpen

func (p *NacosProvider) ConfigOpen() ([]*File, error)

func (*NacosProvider) SetOnChanged

func (p *NacosProvider) SetOnChanged(changeFunc provider.ChangeFunc)

func (*NacosProvider) Watch

func (p *NacosProvider) Watch() error

type NacosServiceDiscovery added in v0.4.0

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

func NewNacosServiceDiscovery added in v0.4.0

func NewNacosServiceDiscovery(options Options) (*NacosServiceDiscovery, error)

func (*NacosServiceDiscovery) GetInstances added in v0.4.0

func (*NacosServiceDiscovery) Watch added in v0.4.0

type Options

type Options struct {
	Username    string
	Password    string
	NamespaceID string
	Prefix      string
	LogDir      string
	LogLevel    string // debug, info, warn, error
	CacheDir    string
	Endpoints   []string
	Files       []*File
	Timeout     time.Duration
	Watch       bool
}

Jump to

Keyboard shortcuts

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