2 Star 6 Fork 5

Plato / rpc-go-backend

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
service.go 637 Bytes
一键复制 编辑 原始数据 按行查看 历史
CloudGuan 提交于 2022-06-16 13:05 . ISSUE: #I59GFM
package idlrpc
import "context"
//IService user custom service framework interface
type IService interface {
// GetUUID service uuid, generated by rpc-repo
GetUUID() uint64
// GetNickName return custom service nickname !
GetNickName() string
// OnAfterFork init service by framework, user can init some custom data in this function
OnAfterFork(ctx context.Context) bool
// OnTick tick your service the same goroutine
OnTick() bool
// OnBeforeDestroy before service unload, you can clean your own data in this func
OnBeforeDestroy() bool
}
//ServiceCreator service creator
type ServiceCreator func(interface{}) IService
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/dennis-kk/rpc-go-backend.git
git@gitee.com:dennis-kk/rpc-go-backend.git
dennis-kk
rpc-go-backend
rpc-go-backend
v0.4.14

搜索帮助

344bd9b3 5694891 D2dac590 5694891