mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
* version updates * up * add watch feature for package kubecm * feat: support apollo as Adapter (#2143) * feat: support apollo as Adapter * feat: support apollo as Adapter * feat: support apollo as Adapter * feat: test apollo Adapter * feat: test apollo Adapter Co-authored-by: hongyihui <hongyihui@lixiang.com> Co-authored-by: houseme <housemecn@gmail.com> Co-authored-by: John Guo <john@johng.cn> * add gcfg.Adapter implements using apollo service * ci yaml update for apollo Co-authored-by: hong0220 <hong0220@users.noreply.github.com> Co-authored-by: hongyihui <hongyihui@lixiang.com> Co-authored-by: houseme <housemecn@gmail.com>
22 lines
390 B
Go
22 lines
390 B
Go
package main
|
|
|
|
import (
|
|
_ "github.com/gogf/gf/example/config/apollo/boot"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/os/gctx"
|
|
)
|
|
|
|
func main() {
|
|
var ctx = gctx.GetInitCtx()
|
|
|
|
// Available checks.
|
|
g.Dump(g.Cfg().Available(ctx))
|
|
|
|
// All key-value configurations.
|
|
g.Dump(g.Cfg().Data(ctx))
|
|
|
|
// Retrieve certain value by key.
|
|
g.Dump(g.Cfg().MustGet(ctx, "server.address"))
|
|
}
|