refactor: 服务接口 Stop() 重命名为 Shutdown()

This commit is contained in:
2026-05-15 09:03:14 +08:00
parent aed3a5ac22
commit 7741f7584d
6 changed files with 71 additions and 15 deletions
+22
View File
@@ -0,0 +1,22 @@
package contracts
type GoBridgeService interface {
Start() error
Shutdown() error
Restart() error
}
// GoBridge 继承 Controller,可通过 gobridge.WithHandlers 绑定到 Pool
// 所有公开方法自动暴露给 Python 通过 call_go() 调用。
type GoBridge interface {
_gobridge_handler()
Controller
}
// GoBridgeBase 嵌入到用户 struct 以实现 GoBridge 接口
type GoBridgeBase struct {
Controller
}
// _gobridge_handler 签名函数
func (bb *GoBridgeBase) _gobridge_handler() {}