MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / Test

Method Test

internal/nodes/node.go:97–109  ·  view source on GitHub ↗

Test 检查配置

()

Source from the content-addressed store, hash-verified

95
96// Test 检查配置
97func (this *Node) Test() error {
98 // 检查是否能连接API
99 rpcClient, err := rpc.SharedRPC()
100 if err != nil {
101 return fmt.Errorf("test rpc failed: %w", err)
102 }
103 _, err = rpcClient.APINodeRPC.FindCurrentAPINodeVersion(rpcClient.Context(), &pb.FindCurrentAPINodeVersionRequest{})
104 if err != nil {
105 return fmt.Errorf("test rpc failed: %w", err)
106 }
107
108 return nil
109}
110
111// Start 启动
112func (this *Node) Start() {

Callers 1

TestNode_TestFunction · 0.45

Calls 3

SharedRPCFunction · 0.92
ErrorfMethod · 0.80
ContextMethod · 0.80

Tested by 1

TestNode_TestFunction · 0.36