2016-03-24 01:09:13 -07:00
|
|
|
// Copyright (C) 2016 The Syncthing Authors.
|
|
|
|
//
|
|
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
2017-02-08 23:52:18 -07:00
|
|
|
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
2016-03-24 01:09:13 -07:00
|
|
|
|
2019-03-26 12:53:58 -07:00
|
|
|
package api
|
2016-03-24 01:09:13 -07:00
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/syncthing/syncthing/lib/discover"
|
|
|
|
"github.com/syncthing/syncthing/lib/protocol"
|
|
|
|
)
|
|
|
|
|
|
|
|
type mockedCachingMux struct{}
|
|
|
|
|
|
|
|
// from suture.Service
|
|
|
|
|
|
|
|
func (m *mockedCachingMux) Serve() {
|
|
|
|
select {}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *mockedCachingMux) Stop() {
|
|
|
|
}
|
|
|
|
|
|
|
|
// from events.Finder
|
|
|
|
|
2016-05-04 12:38:12 -07:00
|
|
|
func (m *mockedCachingMux) Lookup(deviceID protocol.DeviceID) (direct []string, err error) {
|
|
|
|
return nil, nil
|
2016-03-24 01:09:13 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *mockedCachingMux) Error() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *mockedCachingMux) String() string {
|
|
|
|
return "mockedCachingMux"
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *mockedCachingMux) Cache() map[protocol.DeviceID]discover.CacheEntry {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// from events.CachingMux
|
|
|
|
|
2017-11-22 00:05:49 -07:00
|
|
|
func (m *mockedCachingMux) Add(finder discover.Finder, cacheTime, negCacheTime time.Duration) {
|
2016-03-24 01:09:13 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *mockedCachingMux) ChildErrors() map[string]error {
|
|
|
|
return nil
|
|
|
|
}
|