config_center

package
v0.0.0-...-1fef4f5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddListener

AddListener add config center listener

func LoadConfigCenterConfig

func LoadConfigCenterConfig(cc DynamicConfigurationFactory, conf *config.ConfigCenterConfig, listener ConfigurationListener) string

LoadConfigCenterConfig load config center config

Types

type ConfigChangeEvent

type ConfigChangeEvent struct {
	Key   string
	Value interface{}
}

ConfigChangeEvent

type ConfigurationListener

type ConfigurationListener interface {
	// Process the notification event once there's any change happens on the config
	Process(*ConfigChangeEvent)
}

ConfigurationListener

type DynamicConfigurationFactory

type DynamicConfigurationFactory interface {
	GetConfig(conf *config.ConfigCenterConfig) string                            //返回配置信息
	AddListener(conf *config.ConfigCenterConfig, listener ConfigurationListener) //添加配置监听
	Stop() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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