config_center

package
v1.2.0-rc01 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0 Imports: 8 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 ConfigChangeEvent added in v1.2.0

type ConfigChangeEvent struct {
	Key        string
	Value      interface{}
	ConfigType remoting.EventType
}

func (ConfigChangeEvent) String added in v1.2.0

func (c ConfigChangeEvent) String() string

type ConfigurationListener added in v1.2.0

type ConfigurationListener interface {
	Process(*ConfigChangeEvent)
}

type Configurator added in v1.2.0

type Configurator interface {
	GetUrl() *common.URL
	Configure(url *common.URL)
}

type DynamicConfiguration

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

type DynamicConfigurationFactory

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

type MockDynamicConfiguration added in v1.2.0

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

func (*MockDynamicConfiguration) AddListener added in v1.2.0

func (c *MockDynamicConfiguration) AddListener(key string, listener ConfigurationListener, opions ...Option)

func (*MockDynamicConfiguration) GetConfig added in v1.2.0

func (c *MockDynamicConfiguration) GetConfig(key string, opts ...Option) (string, error)

func (*MockDynamicConfiguration) GetConfigs added in v1.2.0

func (c *MockDynamicConfiguration) GetConfigs(key string, opts ...Option) (string, error)

For zookeeper, getConfig and getConfigs have the same meaning.

func (*MockDynamicConfiguration) MockApplicationConfigEvent added in v1.2.0

func (c *MockDynamicConfiguration) MockApplicationConfigEvent()

func (*MockDynamicConfiguration) MockServiceConfigEvent added in v1.2.0

func (c *MockDynamicConfiguration) MockServiceConfigEvent()

func (*MockDynamicConfiguration) Parser added in v1.2.0

func (*MockDynamicConfiguration) RemoveListener added in v1.2.0

func (c *MockDynamicConfiguration) RemoveListener(key string, listener ConfigurationListener, opions ...Option)

func (*MockDynamicConfiguration) SetParser added in v1.2.0

type MockDynamicConfigurationFactory

type MockDynamicConfigurationFactory struct {
	Content string
}

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
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.

Jump to

Keyboard shortcuts

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