init.go 615 B

12345678910111213141516171819202122
  1. package rpc_apis
  2. import (
  3. "gd_auth_check/common.in/config"
  4. "gd_auth_check/rpc_apis/gd_access_log"
  5. )
  6. //var Vehicle *gd_vehicle.GdVehicleXClient
  7. //var Service *gd_service.GdServiceXClient
  8. var Crontab *gd_access_log.GdAccessLogXClient
  9. func Init(etcdAddrs []string, conf *config.Configure) {
  10. Crontab = &gd_access_log.GdAccessLogXClient{}
  11. Crontab.Init(etcdAddrs, conf.Rpc.BasePath, conf.Rpc.Crontab.Name)
  12. }
  13. func InitForK8s(conf *config.Configure) {
  14. Crontab = &gd_access_log.GdAccessLogXClient{}
  15. Crontab.InitForK8s(conf.Rpc.Crontab.Name, conf.Rpc.Crontab.ServiceName, conf.Rpc.Crontab.ServicePort.String())
  16. }