实现服务的缓存策略设置

This commit is contained in:
GoEdgeLab
2020-10-04 20:38:27 +08:00
parent db21a86825
commit 0bbd178b29
25 changed files with 502 additions and 133 deletions

View File

@@ -113,5 +113,13 @@ func (this *ParentAction) RPC() *rpc.RPCClient {
// 获取Context
func (this *ParentAction) AdminContext() context.Context {
if this.rpcClient == nil {
rpcClient, err := rpc.SharedRPC()
if err != nil {
logs.Fatal(err)
return nil
}
this.rpcClient = rpcClient
}
return this.rpcClient.Context(this.AdminId())
}