// Copyright 2019 getensh.com. All rights reserved. // Use of this source code is governed by getensh.com. // package rcp internal call package rpc_apis import ( "gd_service/rpc_apis/gd_adm_data" "gd_service/rpc_apis/gd_auth_check" "gd_service/common.in/config" ) var AuthCheck *gd_auth_check.GdAuthCheckXClient var AdmData *gd_adm_data.GdAdmDataXClient func Init(etcdAddrs []string, conf *config.Configure) { AuthCheck = &gd_auth_check.GdAuthCheckXClient{} AuthCheck.Init(etcdAddrs, conf.Rpc.BasePath, conf.Rpc.AuthCheck.Name) AdmData = &gd_adm_data.GdAdmDataXClient{} AdmData.Init(etcdAddrs, conf.Rpc.BasePath, conf.Rpc.AdmData.Name) } func InitForK8s(conf *config.Configure) { AuthCheck = &gd_auth_check.GdAuthCheckXClient{} AuthCheck.InitForK8s(conf.Rpc.AuthCheck.Name, conf.Rpc.AuthCheck.ServiceName, conf.Rpc.AuthCheck.ServicePort.String()) AdmData = &gd_adm_data.GdAdmDataXClient{} AdmData.InitForK8s(conf.Rpc.AdmData.Name, conf.Rpc.AdmData.ServiceName, conf.Rpc.AdmData.ServicePort.String()) }