mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 05:00:25 +08:00
实现服务的缓存策略设置
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user