4 Star 5 Fork 4

Plato/Service-Box-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
testcallee_impl.go 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
CloudGuan 提交于 2022-12-09 09:04 . !4update: http 网关功能实现
// Generated by the go idl tools. DO NOT EDIT 2022-03-15 23:05:32
// source: box_example
package testcallee
import "context"
import "errors"
type TestCalleeImpl struct {
}
func NewTestCallee() *TestCalleeImpl {
service := &TestCalleeImpl{}
return service
}
func (sp *TestCalleeImpl) GetUUID() uint64 {
return 6784101180412288340
}
func (sp *TestCalleeImpl) GetNickName() string {
return "6784101180412288340"
}
func (sp *TestCalleeImpl) OnAfterFork(ctx context.Context) bool {
//add this service to framework, do not call rpc method in this function
return true
}
func (sp *TestCalleeImpl) OnTick() bool {
//tick function in main goroutine
return true
}
func (sp *TestCalleeImpl) OnBeforeDestroy() bool {
//tick function in main goroutine
return true
}
func (sp *TestCalleeImpl) Add(ctx context.Context, _1 int32, _2 int32) (ret1 int32, err error) {
ret1 = _1 + _2
return
}
func (sp *TestCalleeImpl) Sub(ctx context.Context, _1 int32, _2 int32) (ret1 int32, err error) {
if _1 < _2 {
err = errors.New("test error return")
} else {
ret1 = _1 - _2
}
return
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/dennis-kk/service-box-go.git
git@gitee.com:dennis-kk/service-box-go.git
dennis-kk
service-box-go
Service-Box-go
v0.4.22

搜索帮助