mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-02 01:40:25 +08:00
集群可以设置默认的WAF策略、缓存策略
This commit is contained in:
18
internal/web/models/base_dao.go
Normal file
18
internal/web/models/base_dao.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
)
|
||||
|
||||
type BaseDAO struct {
|
||||
}
|
||||
|
||||
func (this *BaseDAO) RPC() *rpc.RPCClient {
|
||||
client, err := rpc.SharedRPC()
|
||||
if err != nil {
|
||||
logs.Println("[MODEL]get shared rpc client failed: " + err.Error())
|
||||
return nil
|
||||
}
|
||||
return client
|
||||
}
|
||||
Reference in New Issue
Block a user