refactor: Modular inbound/outbound manager

This commit is contained in:
世界
2024-11-28 14:29:45 +08:00
parent f51bca97a8
commit 2a786daabe
69 changed files with 1184 additions and 754 deletions
+9
View File
@@ -22,3 +22,12 @@ type OutboundRegistry interface {
option.OutboundOptionsRegistry
CreateOutbound(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) (Outbound, error)
}
type OutboundManager interface {
NewService
Outbounds() []Outbound
Outbound(tag string) (Outbound, bool)
Default() Outbound
Remove(tag string) error
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) error
}