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 ¶
InstallConfigClientPlugin install a config client plugin
Types ¶
type Client ¶ added in v0.6.0
type Client interface {
//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)
//Watch get kv change results, you can compare them with local kv cache and refresh local cache
Watch(f func(map[string]interface{}), errHandler func(err error)) error
}
Client is the interface of config server client, it has basic func to interact with config server
var DefaultClient Client
DefaultClient is config server's client
type Options ¶
type Options struct {
ServerURI string
Endpoint string
ServiceName string
ApolloServiceName string
Cluster string
Namespace string
App string
Env string
Version string
TLSConfig *tls.Config
TenantName string
EnableSSL bool
APIVersion string
AutoDiscovery bool
RefreshPort string
DimensionInfo string
}
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.