go-external-config/consul
Consul property source support for go-external-config
About go-external-config/consul
ConsulPropertySource
HashiCorp Consul is a service networking solution that enables teams to manage secure network connectivity between services and across on-prem and multi-cloud environments and runtimes. Consul offers service discovery, service mesh, traffic management, and automated updates to network infrastructure devices. (more)
cmd/app/main.go
import (
_ "github.com/go-external-config/consul"
"github.com/go-external-config/go/env"
)
func main() {
defer err.Recover()
fmt.Println(env.Value[string]("${db.pass}"))
// fmt.Println(env.Value[string]("${consul.app/db/password}"))
}
config/application.yaml
db:
pass: consul:app/db/password
consul:
addr: http://127.0.0.1:8500
token: generated
Frequently Asked Questions
What is go-external-config/consul?
go-external-config/consul is a Configuration library for the Go programming language. Consul property source support for go-external-config
How do I install go-external-config/consul?
Install go-external-config/consul with the Go module system using `go get go-external-config/consul`. Check the repository for the current installation instructions.
What category does go-external-config/consul belong to?
go-external-config/consul is listed under Configuration, specifically Configuration.