init.go 557 B

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