Documentation
¶
Overview ¶
Package client created on 2017/6/22.
Index ¶
Constants ¶
View Source
const ( LoggerInitFailed = "logger initialization failed" PackageInitError = "package not initialize successfully" ConfigServerMemRefreshError = "error in poulating config server member" EmptyConfigServerMembers = "empty config server member" EmptyConfigServerConfig = "empty config sevrer passed" RefreshModeError = "refreshMode must be 0 or 1." )
error response constants
Variables ¶
This section is empty.
Functions ¶
func InstallConfigClientPlugin ¶
func InstallConfigClientPlugin(name string, f func(options Options) ConfigClient)
InstallConfigClientPlugin install a config client plugin
Types ¶
type ConfigClient ¶
type ConfigClient interface {
//Init the Configuration for the Server
//PullConfigs pull all configs from remote
PullConfigs(serviceName, version, app, env string) (map[string]interface{}, error)
//PullConfig pull one config from remote
PullConfig(serviceName, version, app, env, key, contentType string) (interface{}, error)
//PullConfigsByDI pulls the configurations with customized DimensionInfo/Project
PullConfigsByDI(dimensionInfo, diInfo string) (map[string]map[string]interface{}, error)
// PushConfigs push config to cc
PushConfigs(data map[string]interface{}, dimensionInfo string) (map[string]interface{}, error)
// DeleteConfigsByKeys delete config for cc by keys
DeleteConfigsByKeys(keys []string, dimensionInfo string) (map[string]interface{}, error)
}
ConfigClient is the interface of config server client, it has basic func to interact with config server
var DefaultClient ConfigClient
DefaultClient is config server's client
Directories
¶
| Path | Synopsis |
|---|---|
|
Package memberdiscovery created on 2017/6/20.
|
Package memberdiscovery created on 2017/6/20. |
|
Package serializers created on 2017/6/22.
|
Package serializers created on 2017/6/22. |
|
json
Package json is used for marshalling and unmarshalling
|
Package json is used for marshalling and unmarshalling |
Click to show internal directories.
Click to hide internal directories.