This commit is contained in:
@@ -35,6 +35,7 @@ type fakeConnection struct {
|
||||
indexFn func(context.Context, string, []protocol.FileInfo)
|
||||
requestFn func(ctx context.Context, folder, name string, offset int64, size int, hash []byte, fromTemporary bool) ([]byte, error)
|
||||
closeFn func(error)
|
||||
clusterConfigFn func(protocol.ClusterConfig)
|
||||
mut sync.Mutex
|
||||
}
|
||||
|
||||
@@ -91,7 +92,13 @@ func (f *fakeConnection) Request(ctx context.Context, folder, name string, offse
|
||||
return f.fileData[name], nil
|
||||
}
|
||||
|
||||
func (f *fakeConnection) ClusterConfig(protocol.ClusterConfig) {}
|
||||
func (f *fakeConnection) ClusterConfig(cc protocol.ClusterConfig) {
|
||||
f.mut.Lock()
|
||||
defer f.mut.Unlock()
|
||||
if f.clusterConfigFn != nil {
|
||||
f.clusterConfigFn(cc)
|
||||
}
|
||||
}
|
||||
|
||||
func (f *fakeConnection) Ping() bool {
|
||||
f.mut.Lock()
|
||||
|
||||
Reference in New Issue
Block a user