feat(gateway): 优化gateway相关功能
Quality check / Web UI (push) Successful in 9m19s

This commit is contained in:
mei
2026-09-12 15:32:27 +08:00
parent 0d89b7fe8f
commit 9b656cebee
84 changed files with 2769 additions and 825 deletions
+22
View File
@@ -0,0 +1,22 @@
package gateway
import "sync"
var (
once sync.Once
registry *Registry
)
// InitGatewayRegistry 返回全局唯一的消息网关注册表
func InitGatewayRegistry() *Registry {
once.Do(func() {
r := NewRegistry()
// 注册所有消息网关
r.Register(&WebhookGateway{})
// 未来添加新网关类型时,在这里注册即可
registry = r
})
return registry
}