Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mock.go « datastore « praefect « internal - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d03c35a2ed9c9e55b8f0c6ffaa3c3f4bf97c298d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
}

//nolint:revive // This is unintentionally missing documentation.
func (m *MockReplicationEventQueue) Enqueue(ctx context.Context, event ReplicationEvent) (ReplicationEvent, error) {
	return m.EnqueueFunc(ctx, event)
}