Spring Cloud Config Client is GO client for Spring Cloud Config. Supports Property Overrides feature.
package main
import (
"fmt"
configclient "github.com/deliveryhero/spring-cloud-config-client-go/springconfigclient"
)
func main() {
c := configclient.RemoteConfig{
Url: "https://remote-url.com",
Username: "username",
Password: "pass",
}
a := configclient.New("sample-api", "prod", "0.0.1", &c)
if err := a.Sync(); err != nil {
fmt.Println("Error: ", err)
}
fmt.Println("ENV_KEY value is: ", a.GetEnv("ENV_KEY"))
}
You can add this package via;
go get github.com/deliveryhero/spring-cloud-config-client-go
To run tests, use rake test
or;
go test -p 1 -v -race ./...
Prerequisites
- You need to be in
main
branch - You need to be ready to bump to a new version
Use rake publish[revision]
task to bump new version and push newly created
tag and updated code to remote and verify go package. (all in one!)
rake publish
:0.0.0
->0.0.1
, default revision ispatch
rake publish[minor]
:0.0.0
->0.1.0
rake publish[major]
:0.0.0
->1.0.0
- Erhan Akpınar - Creator, maintainer
- Hakan Kutluay - Contributor
All PR’s are welcome!
fork
(https://github.com/deliveryhero/spring-cloud-config-client-go/fork)- Create your
branch
(git checkout -b my-feature
) commit
yours (git commit -am 'add some functionality'
)push
yourbranch
(git push origin my-feature
)- Than create a new Pull Request!
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.