config_center

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 6 Imported by: 4 modules, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DEFAULT_CONFIG_TIMEOUT = "10s"
View Source
const DEFAULT_GROUP = "dubbo"

//////////////////////////////////////// DynamicConfiguration ////////////////////////////////////////

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationParser

type ConfigurationParser interface {
	Parse(string) (map[string]string, error)
}

type DefaultConfigurationParser

type DefaultConfigurationParser struct{}

for support properties file in config center

func (*DefaultConfigurationParser) Parse

func (parser *DefaultConfigurationParser) Parse(content string) (map[string]string, error)

type DynamicConfiguration

type DynamicConfiguration interface {
	Parser() ConfigurationParser
	SetParser(ConfigurationParser)
	AddListener(string, remoting.ConfigurationListener, ...Option)
	RemoveListener(string, remoting.ConfigurationListener, ...Option)
	GetConfig(string, ...Option) (string, error)
	GetConfigs(string, ...Option) (string, error)
}

type DynamicConfigurationFactory

type DynamicConfigurationFactory interface {
	GetDynamicConfiguration(*common.URL) (DynamicConfiguration, error)
}

type MockDynamicConfigurationFactory

type MockDynamicConfigurationFactory struct{}

func (*MockDynamicConfigurationFactory) GetDynamicConfiguration

func (f *MockDynamicConfigurationFactory) GetDynamicConfiguration(url *common.URL) (DynamicConfiguration, error)

type Option

type Option func(*Options)

func WithGroup

func WithGroup(group string) Option

func WithTimeout

func WithTimeout(time time.Duration) Option

type Options

type Options struct {
	Group   string
	Timeout time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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