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: 12

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