12345678910111213141516171819202122232425262728293031 |
- // 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_vehicle/rpc_apis/gd_adm_data"
- "gd_vehicle/rpc_apis/gd_auth_check"
- "gd_vehicle/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)
- AdmData = &gd_adm_data.GdAdmDataXClient{}
- AdmData.InitForK8s(conf.Rpc.AdmData.Name, conf.Rpc.AdmData.ServiceName, conf.Rpc.AdmData.ServicePort)
- }
|