Categorygithub.com/go-chassis/go-chassis-config
modulepackage
0.15.0
Repository: https://github.com/go-chassis/go-chassis-config.git
Documentation: pkg.go.dev

# README

go-chassis-config

Build Status
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:

nameimportdescription
config_centergithub.com/go-chassis/go-chassis-config/configcenterhuawei cloud CSE config center https://www.huaweicloud.com/product/cse.html
apollo(not longer under maintenance)github.com/go-chassis/go-chassis-config/apolloctrip apollo https://github.com/ctripcorp/apollo
servicecomb-kiegithub.com/apache/servicecomb-kie/client/adaptorapache servicecomb-kie https://github.com/apache/servicecomb-kie

Example

Get a client of config center

  1. import the config client you want to use
import _ "github.com/go-chassis/go-chassis-config/configcenter"
  1. 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.

# Structs

No description provided by the author

# Interfaces

Client is the interface of config server client, it has basic func to interact with config server.