1
1
Agollo - Go Client for Apollo
2
2
================
3
+ English | [ 中文] ( /README_CN.md )
3
4
4
5
[ ![ golang] ( https://img.shields.io/badge/Language-Go-green.svg?style=flat )] ( https://golang.org )
5
6
[ ![ Build Status] ( https://github.com/apolloconfig/agollo/actions/workflows/go.yml/badge.svg )] ( https://github.com/apolloconfig/agollo/actions/workflows/go.yml )
@@ -11,35 +12,36 @@ Agollo - Go Client for Apollo
11
12
[ ![ GitHub release] ( https://img.shields.io/github/release/apolloconfig/agollo.svg )] ( https://github.com/apolloconfig/apolloconfig/releases )
12
13
[ ![ 996.icu] ( https://img.shields.io/badge/link-996.icu-red.svg )] ( https://996.icu )
13
14
14
- 方便Golang接入配置中心框架 [ Apollo] ( https://github.com/ctripcorp /apollo ) 所开发的Golang版本客户端。
15
+ A Golang client for the configuration center framework [ Apollo] ( https://github.com/apolloconfig /apollo ) .
15
16
16
17
# Features
17
18
18
- * 支持多 IP、AppID、namespace
19
- * 实时同步配置
20
- * 灰度配置
21
- * 延迟加载(运行时)namespace
22
- * 客户端,配置文件容灾
23
- * 自定义日志,缓存组件
24
- * 支持配置访问秘钥
19
+ * Support for multiple IPs, AppIDs, and namespaces
20
+ * Real-time configuration synchronization
21
+ * Gray release configuration
22
+ * Lazy loading (runtime) namespaces
23
+ * Client-side and configuration file fallback
24
+ * Customizable logger and cache components
25
+ * Support for configuration access keys
25
26
26
27
# Usage
27
28
28
- ## 快速入门
29
+ ## Quick Start
29
30
30
- ### 导入 agollo
31
+ ### Import agollo
31
32
32
33
```
33
34
go get -u github.com/apolloconfig/agollo/v4@latest
34
35
```
35
36
36
- ### 启动 agollo
37
+ ### Initialize agollo
37
38
38
- ```
39
+ ``` go
39
40
package main
40
41
41
42
import (
42
43
" fmt"
44
+
43
45
" github.com/apolloconfig/agollo/v4"
44
46
" github.com/apolloconfig/agollo/v4/env/config"
45
47
)
@@ -48,7 +50,7 @@ func main() {
48
50
c := &config.AppConfig {
49
51
AppID: " testApplication_yang" ,
50
52
Cluster: " dev" ,
51
- IP: "http://106.54.227.205 :8080",
53
+ IP: " http://localhost :8080" ,
52
54
NamespaceName: " dubbo" ,
53
55
IsBackupConfig: true ,
54
56
Secret: " 6ce3ff7e96a24335a9634fe9abca6d51" ,
@@ -57,7 +59,7 @@ func main() {
57
59
client , _ := agollo.StartWithConfig (func () (*config.AppConfig , error ) {
58
60
return c, nil
59
61
})
60
- fmt.Println("初始化Apollo配置成功 ")
62
+ fmt.Println (" Apollo configuration initialized successfully " )
61
63
62
64
// Use your apollo key to test
63
65
cache := client.GetConfigCache (c.NamespaceName )
@@ -66,19 +68,19 @@ func main() {
66
68
}
67
69
```
68
70
69
- ## 更多用法
71
+ ## More Examples
70
72
71
- *** 使用Demo *** : [ agollo_demo] ( https://github.com/zouyx/agollo_demo )
73
+ *** Demo Project *** : [ agollo_demo] ( https://github.com/zouyx/agollo_demo )
72
74
73
- *** 其他语言 *** : [ agollo-agent] ( https://github.com/zouyx/agollo-agent.git ) 做本地agent接入,如: PHP
75
+ *** Other Languages: *** : Use [ agollo-agent] ( https://github.com/zouyx/agollo-agent.git ) as a local agent for languages like PHP.
74
76
75
- 欢迎查阅 [ Wiki] ( https://github.com/apolloconfig/agollo/wiki ) 或者 [ godoc] ( http://godoc.org/github.com/zouyx/agollo ) 获取更多有用的信息
77
+ Check out our [ Wiki] ( https://github.com/apolloconfig/agollo/wiki ) or [ godoc] ( http://godoc.org/github.com/zouyx/agollo ) for more information.
76
78
77
- 如果你觉得该工具还不错或者有问题,一定要让我知道,可以发邮件或者 [ 留言 ] ( https://github.com/apolloconfig/agollo/issues ) 。
79
+ 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 ) 。
78
80
79
81
# User
80
82
81
- * [ 使用者名单 ] ( https://github.com/apolloconfig/agollo/issues/20 )
83
+ * [ User List ] ( https://github.com/apolloconfig/agollo/issues/20 )
82
84
83
85
# Contribution
84
86
@@ -91,4 +93,4 @@ The project is licensed under the [Apache 2 license](https://github.com/apolloco
91
93
92
94
# Reference
93
95
94
- Apollo : https://github.com/ctripcorp /apollo
96
+ Apollo: [ https://github.com/apolloconfig /apollo ] ( https://github.com/apolloconfig/apollo )
0 commit comments