mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
GO-3170: add pick function
Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
This commit is contained in:
parent
7336db3206
commit
a2b8442749
5 changed files with 61 additions and 16 deletions
|
@ -3,7 +3,6 @@ package commonspace
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/anyproto/any-sync/commonspace/peerstatus"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -229,6 +228,10 @@ func (m *mockPool) DialOneOf(ctx context.Context, peerIds []string) (peer.Peer,
|
|||
return nil, fmt.Errorf("can't dial peer")
|
||||
}
|
||||
|
||||
func (m *mockPool) Pick(ctx context.Context, id string) (peer.Peer, error) {
|
||||
return nil, fmt.Errorf("no such peer")
|
||||
}
|
||||
|
||||
//
|
||||
// Mock Config
|
||||
//
|
||||
|
@ -473,9 +476,9 @@ func (m mockPeerStatus) Close(ctx context.Context) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (m mockPeerStatus) SendPeerUpdate() {}
|
||||
func (m mockPeerStatus) CheckPeerStatus() {}
|
||||
|
||||
func (m mockPeerStatus) SendNewStatus(status peerstatus.Status) {}
|
||||
func (m mockPeerStatus) SendNotPossibleStatus() {}
|
||||
|
||||
//
|
||||
// Space fixture
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue