# README
go-chassis-config
go-chassis-config is able to pull configs from heterogeneous distributed configuration
management service.
it is decoupled with go chassis. you can use it directly without go chassis.
Supported distributed configuration management service:
name | import | description |
---|---|---|
config_center | github.com/go-chassis/go-chassis-config/configcenter | huawei cloud CSE config center https://www.huaweicloud.com/product/cse.html |
apollo(not longer under maintenance) | github.com/go-chassis/go-chassis-config/apollo | ctrip apollo https://github.com/ctripcorp/apollo |
servicecomb-kie | github.com/apache/servicecomb-kie/client/adaptor | apache servicecomb-kie https://github.com/apache/servicecomb-kie |
Example
Get a client of config center
- import the config client you want to use
import _ "github.com/go-chassis/go-chassis-config/configcenter"
- Create a client
c, err := ccclient.NewClient("config_center", ccclient.Options{
ServerURI: "http://127.0.0.1:30200",
})
Use huawei cloud
import (
"github.com/huaweicse/auth"
"github.com/go-chassis/foundation/httpclient"
_ "github.com/go-chassis/go-chassis-config/configcenter"
)
func main() {
var err error
httpclient.SignRequest,err =auth.GetShaAKSKSignFunc("your ak", "your sk", "")
if err!=nil{
//handle err
}
ccclient.NewClient("config_center",ccclient.Options{
ServerURI:"the address of CSE endpoint",
})
}
# Packages
Package memberdiscovery created on 2017/6/20.
No description provided by the author
Package serializers created on 2017/6/22.
# Functions
InstallConfigClientPlugin install a config client plugin.
NewClient create config client implementation.
# Constants
error response constants.
error response constants.
error response constants.
const.
const.
const.
const.
error response constants.
error response constants.
error response constants.
# Variables
DefaultClient is config server's client.
# Interfaces
Client is the interface of config server client, it has basic func to interact with config server.