实现服务的缓存策略设置

This commit is contained in:
刘祥超
2020-10-04 20:38:27 +08:00
parent ed731de9ec
commit 1cd0cd0376
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())
}