https://github.com/apolloconfig/agollo
πGo client for ctrip/apollo (https://github.com/apolloconfig/apollo)
https://github.com/apolloconfig/agollo
apollo apollo-client client-library client-side configuration-management go godoc golang
Last synced: 27 days ago
JSON representation
πGo client for ctrip/apollo (https://github.com/apolloconfig/apollo)
- Host: GitHub
- URL: https://github.com/apolloconfig/agollo
- Owner: apolloconfig
- License: apache-2.0
- Created: 2017-06-23T03:17:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-11T04:14:17.000Z (about 2 months ago)
- Last Synced: 2025-05-11T16:30:24.988Z (29 days ago)
- Topics: apollo, apollo-client, client-library, client-side, configuration-management, go, godoc, golang
- Language: Go
- Homepage: https://www.apolloconfig.com
- Size: 837 KB
- Stars: 738
- Watchers: 15
- Forks: 191
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Agollo - Go Client for Apollo
================
English | [δΈζ](/README_CN.md)[](https://golang.org)
[](https://github.com/apolloconfig/agollo/actions/workflows/go.yml)
[](https://goreportcard.com/report/github.com/apolloconfig/agollo)
[](https://codebeat.co/projects/github-com-apolloconfig-agollo-master)
[](https://coveralls.io/github/apolloconfig/agollo?branch=master)
[](https://opensource.org/licenses/Apache-2.0)
[](http://godoc.org/github.com/apolloconfig/agollo)
[](https://github.com/apolloconfig/apolloconfig/releases)
[](https://996.icu)A Golang client for the configuration center framework [Apollo](https://github.com/apolloconfig/apollo).
# Features
* Support for multiple IPs, AppIDs, and namespaces
* Real-time configuration synchronization
* Gray release configuration
* Lazy loading (runtime) namespaces
* Client-side and configuration file fallback
* Customizable logger and cache components
* Support for configuration access keys# Usage
## Quick Start
### Import agollo
```
go get -u github.com/apolloconfig/agollo/v4@latest
```### Initialize agollo
```go
package mainimport (
"fmt""github.com/apolloconfig/agollo/v4"
"github.com/apolloconfig/agollo/v4/env/config"
)func main() {
c := &config.AppConfig{
AppID: "testApplication_yang",
Cluster: "dev",
IP: "http://localhost:8080",
NamespaceName: "dubbo",
IsBackupConfig: true,
Secret: "6ce3ff7e96a24335a9634fe9abca6d51",
}client, _ := agollo.StartWithConfig(func() (*config.AppConfig, error) {
return c, nil
})
fmt.Println("Apollo configuration initialized successfully")//Use your apollo key to test
cache := client.GetConfigCache(c.NamespaceName)
value, _ := cache.Get("key")
fmt.Println(value)
}
```## More Examples
***Demo Project***: [agollo_demo](https://github.com/zouyx/agollo_demo)
***Other Languages:***: Use [agollo-agent](https://github.com/zouyx/agollo-agent.git) as a local agent for languages like PHP.
Check out our [Wiki](https://github.com/apolloconfig/agollo/wiki) or [godoc](http://godoc.org/github.com/zouyx/agollo) for more information.
If you find this tool useful or encounter any issues, please let me know via email or by [creating an issue](https://github.com/apolloconfig/agollo/issues)γ
# User
* [User List](https://github.com/apolloconfig/agollo/issues/20)
# Contribution
* Source Code: https://github.com/apolloconfig/agollo/
* Issue Tracker: https://github.com/apolloconfig/agollo/issues# License
The project is licensed under the [Apache 2 license](https://github.com/apolloconfig/agollo/blob/master/LICENSE).
# Reference
Apollo: [https://github.com/apolloconfig/apollo](https://github.com/apolloconfig/apollo)