Coder Social home page Coder Social logo

go-chassis / go-chassis-config Goto Github PK

View Code? Open in Web Editor NEW
23.0 8.0 14.0 113 KB

pull and push configs in distributed configuration management service. migrated to go-archaius https://github.com/go-chassis/go-archaius/pull/87

License: Apache License 2.0

Go 91.29% Shell 8.71%
distributed-systems configuration distributed-configuration microservice

go-chassis-config's Introduction

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:

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

  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",
	})
}

go-chassis-config's People

Contributors

asifdxtreme avatar chinx avatar humingcheng avatar lizihuai avatar savitaashture avatar surechen avatar thandayuthapani avatar tianxiaoliang avatar wangkirin avatar zenlint avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.