实现缓存策略的部分功能

This commit is contained in:
刘祥超
2020-10-04 14:27:05 +08:00
parent bd51284504
commit 937b07cbf6
49 changed files with 1444 additions and 189 deletions

View File

@@ -0,0 +1,22 @@
package nodeutils
import (
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
_ "github.com/iwind/TeaGo/bootstrap"
"github.com/iwind/TeaGo/logs"
"testing"
)
func TestSendMessageToCluster(t *testing.T) {
rpcClient, err := rpc.SharedRPC()
if err != nil {
t.Fatal(err)
}
ctx := rpcClient.Context(1)
results, err := SendMessageToCluster(ctx, 1, "test", nil, 30)
if err != nil {
t.Fatal(err)
}
logs.PrintAsJSON(results, t)
}