configmgr

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DotenvConfigFormat nacosConfigType = "dotenv"
	YamlConfigFormat   nacosConfigType = "yaml"
)

Variables

View Source
var ApolloClient agollo.Client

Functions

func LoadFromApollo

func LoadFromApollo(appConfig *config.AppConfig) error

func LoadFromNacos

func LoadFromNacos(param vo.NacosClientParam, dataId, format, group string) error

Types

type BaseApolloListener

type BaseApolloListener struct {
	SkippedFirstEvent bool
	Lock              sync.Mutex
}

func (*BaseApolloListener) OnNewestChange

func (c *BaseApolloListener) OnNewestChange(event *storage.FullChangeEvent)

type NacosChangeEvent

type NacosChangeEvent struct {
	Namespace, Group, DataId string
	Changes                  map[string]maputils.Change
}

type NacosConfigListenerParam

type NacosConfigListenerParam struct {
	DataId   string
	OnChange func(event *NacosChangeEvent)
}

type NacosConfigMgr

type NacosConfigMgr struct {
	// contains filtered or unexported fields
}
var NacosClient *NacosConfigMgr

func (*NacosConfigMgr) AddChangeListener

func (m *NacosConfigMgr) AddChangeListener(param NacosConfigListenerParam)

Jump to

Keyboard shortcuts

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