init.go 546 B

12345678910111213141516171819
  1. package rpc_apis
  2. import (
  3. "gd_management/rpc_apis/gd_access_log"
  4. "gd_management/common.in/config"
  5. )
  6. var AccessLog *gd_access_log.GdAccessLogXClient
  7. func Init(etcdAddrs []string, conf *config.Configure) {
  8. AccessLog = &gd_access_log.GdAccessLogXClient{}
  9. AccessLog.Init(etcdAddrs, conf.Rpc.BasePath, conf.Rpc.AccessLog.Name)
  10. }
  11. func InitForK8s(conf *config.Configure) {
  12. AccessLog = &gd_access_log.GdAccessLogXClient{}
  13. AccessLog.InitForK8s(conf.Rpc.AccessLog.Name, conf.Rpc.AccessLog.ServiceName, conf.Rpc.AccessLog.ServicePort.String())
  14. }