refactor: 调整渠道注册机制

This commit is contained in:
tbphp
2025-07-05 08:51:37 +08:00
parent 40f59524f0
commit 92e4a53659
3 changed files with 40 additions and 9 deletions

View File

@@ -11,11 +11,15 @@ import (
"github.com/gin-gonic/gin"
)
func init() {
Register("gemini", newGeminiChannel)
}
type GeminiChannel struct {
*BaseChannel
}
func (f *Factory) NewGeminiChannel(group *models.Group) (*GeminiChannel, error) {
func newGeminiChannel(f *Factory, group *models.Group) (ChannelProxy, error) {
base, err := f.newBaseChannel("gemini", group.Upstreams, group.Config)
if err != nil {
return nil, err