lib: Removal global connection registry (#8254)

This commit is contained in:
Simon Frei
2022-04-09 16:04:56 +02:00
committed by GitHub
parent e30898ddb3
commit b947056e62
17 changed files with 118 additions and 94 deletions
+3 -2
View File
@@ -16,6 +16,7 @@ import (
"time"
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/connections/registry"
"github.com/syncthing/syncthing/lib/nat"
"github.com/syncthing/syncthing/lib/protocol"
"github.com/syncthing/syncthing/lib/stats"
@@ -139,7 +140,7 @@ func (c internalConn) String() string {
}
type dialerFactory interface {
New(config.OptionsConfiguration, *tls.Config) genericDialer
New(config.OptionsConfiguration, *tls.Config, *registry.Registry) genericDialer
Priority() int
AlwaysWAN() bool
Valid(config.Configuration) error
@@ -162,7 +163,7 @@ type genericDialer interface {
}
type listenerFactory interface {
New(*url.URL, config.Wrapper, *tls.Config, chan internalConn, *nat.Service) genericListener
New(*url.URL, config.Wrapper, *tls.Config, chan internalConn, *nat.Service, *registry.Registry) genericListener
Valid(config.Configuration) error
}