mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
lib/connections: Return exported intf from exported function (#5947)
This commit is contained in:
parent
6fa02d5081
commit
cf40ed6cec
@ -27,3 +27,7 @@ func (m *mockedConnections) NATType() string {
|
|||||||
func (m *mockedConnections) Serve() {}
|
func (m *mockedConnections) Serve() {}
|
||||||
|
|
||||||
func (m *mockedConnections) Stop() {}
|
func (m *mockedConnections) Stop() {}
|
||||||
|
|
||||||
|
func (m *mockedConnections) ExternalAddresses() []string { return nil }
|
||||||
|
|
||||||
|
func (m *mockedConnections) AllAddresses() []string { return nil }
|
||||||
|
@ -90,6 +90,7 @@ var tlsVersionNames = map[uint16]string{
|
|||||||
// dialers. Successful connections are handed to the model.
|
// dialers. Successful connections are handed to the model.
|
||||||
type Service interface {
|
type Service interface {
|
||||||
suture.Service
|
suture.Service
|
||||||
|
discover.AddressLister
|
||||||
ListenerStatus() map[string]ListenerStatusEntry
|
ListenerStatus() map[string]ListenerStatusEntry
|
||||||
ConnectionStatus() map[string]ConnectionStatusEntry
|
ConnectionStatus() map[string]ConnectionStatusEntry
|
||||||
NATType() string
|
NATType() string
|
||||||
@ -129,9 +130,7 @@ type service struct {
|
|||||||
connectionStatus map[string]ConnectionStatusEntry // address -> latest error/status
|
connectionStatus map[string]ConnectionStatusEntry // address -> latest error/status
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewService(cfg config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *tls.Config, discoverer discover.Finder,
|
func NewService(cfg config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *tls.Config, discoverer discover.Finder, bepProtocolName string, tlsDefaultCommonName string) Service {
|
||||||
bepProtocolName string, tlsDefaultCommonName string) *service {
|
|
||||||
|
|
||||||
service := &service{
|
service := &service{
|
||||||
Supervisor: suture.New("connections.Service", suture.Spec{
|
Supervisor: suture.New("connections.Service", suture.Spec{
|
||||||
Log: func(line string) {
|
Log: func(line string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user