config_center

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

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

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

func (ConfigChangeEvent) String

func (c ConfigChangeEvent) String() string

type ConfigurationListener

type ConfigurationListener interface {
	Process(*ConfigChangeEvent)
}

type Configurator

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

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

func (*MockDynamicConfiguration) AddListener

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

func (*MockDynamicConfiguration) GetConfig

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

func (*MockDynamicConfiguration) GetConfigs

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

For zookeeper, getConfig and getConfigs have the same meaning.

func (*MockDynamicConfiguration) MockApplicationConfigEvent

func (c *MockDynamicConfiguration) MockApplicationConfigEvent()

func (*MockDynamicConfiguration) MockServiceConfigEvent

func (c *MockDynamicConfiguration) MockServiceConfigEvent()

func (*MockDynamicConfiguration) Parser

func (*MockDynamicConfiguration) RemoveListener

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

func (*MockDynamicConfiguration) SetParser

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