blob: 74886dc83886630acdf18774ca72441bf521fedb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
package datastore
import "context"
// MockReplicationEventQueue is a helper for tests that implements ReplicationEventQueue
// and allows for parametrizing behavior.
type MockReplicationEventQueue struct {
ReplicationEventQueue
EnqueueFunc func(context.Context, ReplicationEvent) (ReplicationEvent, error)
}
func (m *MockReplicationEventQueue) Enqueue(ctx context.Context, event ReplicationEvent) (ReplicationEvent, error) {
return m.EnqueueFunc(ctx, event)
}
|