nacos

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(namespaces, endpoints []string, auth ...BasicAuth) error

func SupportViper

func SupportViper() error

Types

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

type NacosMgr

type NacosMgr struct {
	// contains filtered or unexported fields
}
var Manager *NacosMgr

func NewNacosMgr

func NewNacosMgr(namespaces, endpoints []string, auth ...BasicAuth) (*NacosMgr, error)

func (*NacosMgr) GetData

func (m *NacosMgr) GetData(path string) ([]byte, error)

type NacosRemoteProvider

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

func NewNacosRemoteProvider

func NewNacosRemoteProvider(endpoint, path string) NacosRemoteProvider

func (NacosRemoteProvider) Endpoint

func (rp NacosRemoteProvider) Endpoint() string

func (NacosRemoteProvider) Path

func (rp NacosRemoteProvider) Path() string

func (NacosRemoteProvider) Provider

func (rp NacosRemoteProvider) Provider() string

func (NacosRemoteProvider) SecretKeyring

func (rp NacosRemoteProvider) SecretKeyring() string

type Path

type Path string

func (Path) Parse

func (p Path) Parse() PathParsed

type PathParsed

type PathParsed struct {
	IsRelative bool
	Namespace  string
	Group      string
	DataID     string
	Format     string
}

func (PathParsed) String

func (p PathParsed) String() string

type RemoteConfigProvider

type RemoteConfigProvider struct {
	ConfigManager *NacosMgr
}

func (*RemoteConfigProvider) Get

func (*RemoteConfigProvider) Watch

func (*RemoteConfigProvider) WatchChannel

func (r *RemoteConfigProvider) WatchChannel(rp viper.RemoteProvider) (<-chan *viper.RemoteResponse, chan bool)

Jump to

Keyboard shortcuts

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