新增测试模块

This commit is contained in:
boyce
2019-09-23 14:38:44 +08:00
parent 6e1ccc9a36
commit 9623cd2735
11 changed files with 298 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
package main
import (
"fmt"
"github.com/duanhf2012/origin/cluster"
"github.com/duanhf2012/origin/originnode"
"github.com/duanhf2012/origin/service"
)
type SubNet1_Service struct {
service.BaseService
}
func init() {
originnode.InitService(&SubNet1_Service{})
}
//OnInit ...
func (ws *SubNet1_Service) OnInit() error {
return nil
}
//OnRun ...
func (ws *SubNet1_Service) OnRun() bool {
var in InputData
var ret int
in.A1 = 10
in.A2 = 20
err := cluster.Call("SubNet2_Service1.RPC_Multi", &in, &ret)
fmt.Printf("%+v", err)
return false
}