mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-17 15:56:39 +00:00
Fix moc interface
This commit is contained in:
@@ -16,6 +16,7 @@ type MockClient struct {
|
||||
SendToStreamFunc func(msg *proto.EncryptedMessage) error
|
||||
SendFunc func(msg *proto.Message) error
|
||||
SetOnReconnectedListenerFunc func(f func())
|
||||
SendWithDeliveryCheckFn func(msg *proto.Message) error
|
||||
}
|
||||
|
||||
// SetOnReconnectedListener sets the function to be called when the client reconnects.
|
||||
@@ -82,3 +83,10 @@ func (sm *MockClient) Send(msg *proto.Message) error {
|
||||
}
|
||||
return sm.SendFunc(msg)
|
||||
}
|
||||
|
||||
func (sm *MockClient) SendWithDeliveryCheck(msg *proto.Message) error {
|
||||
if sm.SendWithDeliveryCheckFn == nil {
|
||||
return nil
|
||||
}
|
||||
return sm.SendWithDeliveryCheck(msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user