123456789101112131415161718192021222324252627 |
- package rpc_apis
- import (
- "gd_access_log/rpc_apis/gd_crontab"
- "gd_access_log/rpc_apis/gd_management"
- "gd_access_log/common.in/config"
- )
- var Management *gd_management.GdManagementXClient
- var Crontab *gd_crontab.GdCrontabXClient
- func Init(etcdAddrs []string, conf *config.Configure) {
- Management = &gd_management.GdManagementXClient{}
- Management.Init(etcdAddrs, conf.Rpc.BasePath, conf.Rpc.AuthCheck.Name)
- Crontab = &gd_crontab.GdCrontabXClient{}
- Crontab.Init(etcdAddrs, conf.Rpc.BasePath, conf.Rpc.Crontab.Name)
- }
- func InitForK8s(conf *config.Configure) {
- Management = &gd_management.GdManagementXClient{}
- Management.InitForK8s(conf.Rpc.AuthCheck.Name, conf.Rpc.AuthCheck.ServiceName, conf.Rpc.AuthCheck.ServicePort.String())
- Crontab = &gd_crontab.GdCrontabXClient{}
- Crontab.InitForK8s(conf.Rpc.Crontab.Name, conf.Rpc.Crontab.ServiceName, conf.Rpc.Crontab.ServicePort.String())
- }
|