Documentation ¶
Overview ¶
Package memberdiscovery created on 2017/6/20.
Index ¶
- Constants
- Variables
- func GenerateDimension(serviceName, version, appName string) (string, error)
- func NewConfigCenter(options config.Options) (config.Client, error)
- type ConfigCenter
- func (c *ConfigCenter) DeleteConfigsByKeys(keys []string, labels map[string]string) (map[string]interface{}, error)
- func (c *ConfigCenter) Options() config.Options
- func (c *ConfigCenter) PullConfig(key, contentType string, labels map[string]string) (interface{}, error)
- func (c *ConfigCenter) PullConfigs(labels ...map[string]string) (map[string]interface{}, error)
- func (c *ConfigCenter) PushConfigs(items map[string]interface{}, labels map[string]string) (map[string]interface{}, error)
- func (c *ConfigCenter) Watch(f func(map[string]interface{}), errHandler func(err error), ...) error
- type Instance
- type Members
Constants ¶
View Source
const ( //HeaderContentType is a variable of type string HeaderContentType = "Content-Type" //HeaderUserAgent is a variable of type string HeaderUserAgent = "User-Agent" // Name of the Plugin Name = "config_center" )
Variables ¶
View Source
var ( ErrAppEmpty = errors.New("app can not be empty") ErrServiceTooLong = errors.New("exceeded max value for service name") )
errors
View Source
var (
ErrInvalidEP = errors.New("invalid endpoint")
)
Functions ¶
func GenerateDimension ¶ added in v0.8.0
func NewConfigCenter ¶
func NewConfigCenter(options config.Options) (config.Client, error)
NewConfigCenter is a function
Types ¶
type ConfigCenter ¶ added in v0.8.0
type ConfigCenter struct {
// contains filtered or unexported fields
}
ConfigCenter is ConfigCenter Implementation of ConfigCenter
func (*ConfigCenter) DeleteConfigsByKeys ¶ added in v0.8.0
func (c *ConfigCenter) DeleteConfigsByKeys(keys []string, labels map[string]string) (map[string]interface{}, error)
DeleteConfigsByKeys
func (*ConfigCenter) Options ¶ added in v0.9.0
func (c *ConfigCenter) Options() config.Options
func (*ConfigCenter) PullConfig ¶ added in v0.8.0
func (c *ConfigCenter) PullConfig(key, contentType string, labels map[string]string) (interface{}, error)
PullConfig is the implementation of ConfigCenter to pull specific configurations from Config-Server
func (*ConfigCenter) PullConfigs ¶ added in v0.8.0
func (c *ConfigCenter) PullConfigs(labels ...map[string]string) (map[string]interface{}, error)
PullConfigs is the implementation of ConfigCenter to pull all the configurations from Config-Server
func (*ConfigCenter) PushConfigs ¶ added in v0.8.0
func (c *ConfigCenter) PushConfigs(items map[string]interface{}, labels map[string]string) (map[string]interface{}, error)
PushConfigs push configs to ConfigSource cc , success will return { "Result": "Success" }
Click to show internal directories.
Click to hide internal directories.