-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[management] check stream start time for connecting peer #5267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -37,8 +37,8 @@ type MockAccountManager struct { | |||||
| GetUserFromUserAuthFunc func(ctx context.Context, userAuth auth.UserAuth) (*types.User, error) | ||||||
| ListUsersFunc func(ctx context.Context, accountID string) ([]*types.User, error) | ||||||
| GetPeersFunc func(ctx context.Context, accountID, userID, nameFilter, ipFilter string) ([]*nbpeer.Peer, error) | ||||||
| MarkPeerConnectedFunc func(ctx context.Context, peerKey string, connected bool, realIP net.IP) error | ||||||
| SyncAndMarkPeerFunc func(ctx context.Context, accountID string, peerPubKey string, meta nbpeer.PeerSystemMeta, realIP net.IP) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error) | ||||||
| MarkPeerConnectedFunc func(ctx context.Context, peerKey string, connected bool, realIP net.IP, syncTime time.Time) error | ||||||
| SyncAndMarkPeerFunc func(ctx context.Context, accountID string, peerPubKey string, meta nbpeer.PeerSystemMeta, realIP net.IP, syncTime time.Time) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error) | ||||||
| DeletePeerFunc func(ctx context.Context, accountID, peerKey, userID string) error | ||||||
| GetNetworkMapFunc func(ctx context.Context, peerKey string) (*types.NetworkMap, error) | ||||||
| GetPeerNetworkFunc func(ctx context.Context, peerKey string) (*types.Network, error) | ||||||
|
|
@@ -214,9 +214,9 @@ func (am *MockAccountManager) DeleteSetupKey(ctx context.Context, accountID, use | |||||
| return status.Errorf(codes.Unimplemented, "method DeleteSetupKey is not implemented") | ||||||
| } | ||||||
|
|
||||||
| func (am *MockAccountManager) SyncAndMarkPeer(ctx context.Context, accountID string, peerPubKey string, meta nbpeer.PeerSystemMeta, realIP net.IP) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error) { | ||||||
| func (am *MockAccountManager) SyncAndMarkPeer(ctx context.Context, accountID string, peerPubKey string, meta nbpeer.PeerSystemMeta, realIP net.IP, syncTime time.Time) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error) { | ||||||
| if am.SyncAndMarkPeerFunc != nil { | ||||||
| return am.SyncAndMarkPeerFunc(ctx, accountID, peerPubKey, meta, realIP) | ||||||
| return am.SyncAndMarkPeerFunc(ctx, accountID, peerPubKey, meta, realIP, syncTime) | ||||||
| } | ||||||
| return nil, nil, nil, 0, status.Errorf(codes.Unimplemented, "method MarkPeerConnected is not implemented") | ||||||
| } | ||||||
|
|
@@ -322,9 +322,9 @@ func (am *MockAccountManager) GetAccountIDByUserID(ctx context.Context, userAuth | |||||
| } | ||||||
|
|
||||||
| // MarkPeerConnected mock implementation of MarkPeerConnected from server.AccountManager interface | ||||||
| func (am *MockAccountManager) MarkPeerConnected(ctx context.Context, peerKey string, connected bool, realIP net.IP, accountID string) error { | ||||||
| func (am *MockAccountManager) MarkPeerConnected(ctx context.Context, peerKey string, connected bool, realIP net.IP, accountID string, syncTime time.Time) error { | ||||||
| if am.MarkPeerConnectedFunc != nil { | ||||||
| return am.MarkPeerConnectedFunc(ctx, peerKey, connected, realIP) | ||||||
| return am.MarkPeerConnectedFunc(ctx, peerKey, connected, realIP, syncTime) | ||||||
|
||||||
| return am.MarkPeerConnectedFunc(ctx, peerKey, connected, realIP, syncTime) | |
| return am.MarkPeerConnectedFunc(ctx, peerKey, connected, realIP, accountID, syncTime) |
Uh oh!
There was an error while loading. Please reload this page.