/
domainReplicationQueue_mock.go
230 lines (197 loc) · 9.84 KB
/
domainReplicationQueue_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
// The MIT License (MIT)
//
// Copyright (c) 2017-2020 Uber Technologies Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// Code generated by MockGen. DO NOT EDIT.
// Source: domainReplicationQueue.go
// Package persistence is a generated GoMock package.
package persistence
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
replicator "github.com/uber/cadence/.gen/go/replicator"
)
// MockDomainReplicationQueue is a mock of DomainReplicationQueue interface
type MockDomainReplicationQueue struct {
ctrl *gomock.Controller
recorder *MockDomainReplicationQueueMockRecorder
}
// MockDomainReplicationQueueMockRecorder is the mock recorder for MockDomainReplicationQueue
type MockDomainReplicationQueueMockRecorder struct {
mock *MockDomainReplicationQueue
}
// NewMockDomainReplicationQueue creates a new mock instance
func NewMockDomainReplicationQueue(ctrl *gomock.Controller) *MockDomainReplicationQueue {
mock := &MockDomainReplicationQueue{ctrl: ctrl}
mock.recorder = &MockDomainReplicationQueueMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockDomainReplicationQueue) EXPECT() *MockDomainReplicationQueueMockRecorder {
return m.recorder
}
// Start mocks base method
func (m *MockDomainReplicationQueue) Start() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Start")
}
// Start indicates an expected call of Start
func (mr *MockDomainReplicationQueueMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockDomainReplicationQueue)(nil).Start))
}
// Stop mocks base method
func (m *MockDomainReplicationQueue) Stop() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Stop")
}
// Stop indicates an expected call of Stop
func (mr *MockDomainReplicationQueueMockRecorder) Stop() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockDomainReplicationQueue)(nil).Stop))
}
// Publish mocks base method
func (m *MockDomainReplicationQueue) Publish(ctx context.Context, message interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Publish", ctx, message)
ret0, _ := ret[0].(error)
return ret0
}
// Publish indicates an expected call of Publish
func (mr *MockDomainReplicationQueueMockRecorder) Publish(ctx, message interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockDomainReplicationQueue)(nil).Publish), ctx, message)
}
// PublishToDLQ mocks base method
func (m *MockDomainReplicationQueue) PublishToDLQ(ctx context.Context, message interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PublishToDLQ", ctx, message)
ret0, _ := ret[0].(error)
return ret0
}
// PublishToDLQ indicates an expected call of PublishToDLQ
func (mr *MockDomainReplicationQueueMockRecorder) PublishToDLQ(ctx, message interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishToDLQ", reflect.TypeOf((*MockDomainReplicationQueue)(nil).PublishToDLQ), ctx, message)
}
// GetReplicationMessages mocks base method
func (m *MockDomainReplicationQueue) GetReplicationMessages(ctx context.Context, lastMessageID int64, maxCount int) ([]*replicator.ReplicationTask, int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetReplicationMessages", ctx, lastMessageID, maxCount)
ret0, _ := ret[0].([]*replicator.ReplicationTask)
ret1, _ := ret[1].(int64)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetReplicationMessages indicates an expected call of GetReplicationMessages
func (mr *MockDomainReplicationQueueMockRecorder) GetReplicationMessages(ctx, lastMessageID, maxCount interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReplicationMessages", reflect.TypeOf((*MockDomainReplicationQueue)(nil).GetReplicationMessages), ctx, lastMessageID, maxCount)
}
// UpdateAckLevel mocks base method
func (m *MockDomainReplicationQueue) UpdateAckLevel(ctx context.Context, lastProcessedMessageID int64, clusterName string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateAckLevel", ctx, lastProcessedMessageID, clusterName)
ret0, _ := ret[0].(error)
return ret0
}
// UpdateAckLevel indicates an expected call of UpdateAckLevel
func (mr *MockDomainReplicationQueueMockRecorder) UpdateAckLevel(ctx, lastProcessedMessageID, clusterName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAckLevel", reflect.TypeOf((*MockDomainReplicationQueue)(nil).UpdateAckLevel), ctx, lastProcessedMessageID, clusterName)
}
// GetAckLevels mocks base method
func (m *MockDomainReplicationQueue) GetAckLevels(ctx context.Context) (map[string]int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAckLevels", ctx)
ret0, _ := ret[0].(map[string]int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAckLevels indicates an expected call of GetAckLevels
func (mr *MockDomainReplicationQueueMockRecorder) GetAckLevels(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAckLevels", reflect.TypeOf((*MockDomainReplicationQueue)(nil).GetAckLevels), ctx)
}
// GetMessagesFromDLQ mocks base method
func (m *MockDomainReplicationQueue) GetMessagesFromDLQ(ctx context.Context, firstMessageID, lastMessageID int64, pageSize int, pageToken []byte) ([]*replicator.ReplicationTask, []byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMessagesFromDLQ", ctx, firstMessageID, lastMessageID, pageSize, pageToken)
ret0, _ := ret[0].([]*replicator.ReplicationTask)
ret1, _ := ret[1].([]byte)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetMessagesFromDLQ indicates an expected call of GetMessagesFromDLQ
func (mr *MockDomainReplicationQueueMockRecorder) GetMessagesFromDLQ(ctx, firstMessageID, lastMessageID, pageSize, pageToken interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMessagesFromDLQ", reflect.TypeOf((*MockDomainReplicationQueue)(nil).GetMessagesFromDLQ), ctx, firstMessageID, lastMessageID, pageSize, pageToken)
}
// UpdateDLQAckLevel mocks base method
func (m *MockDomainReplicationQueue) UpdateDLQAckLevel(ctx context.Context, lastProcessedMessageID int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateDLQAckLevel", ctx, lastProcessedMessageID)
ret0, _ := ret[0].(error)
return ret0
}
// UpdateDLQAckLevel indicates an expected call of UpdateDLQAckLevel
func (mr *MockDomainReplicationQueueMockRecorder) UpdateDLQAckLevel(ctx, lastProcessedMessageID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDLQAckLevel", reflect.TypeOf((*MockDomainReplicationQueue)(nil).UpdateDLQAckLevel), ctx, lastProcessedMessageID)
}
// GetDLQAckLevel mocks base method
func (m *MockDomainReplicationQueue) GetDLQAckLevel(ctx context.Context) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetDLQAckLevel", ctx)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetDLQAckLevel indicates an expected call of GetDLQAckLevel
func (mr *MockDomainReplicationQueueMockRecorder) GetDLQAckLevel(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDLQAckLevel", reflect.TypeOf((*MockDomainReplicationQueue)(nil).GetDLQAckLevel), ctx)
}
// RangeDeleteMessagesFromDLQ mocks base method
func (m *MockDomainReplicationQueue) RangeDeleteMessagesFromDLQ(ctx context.Context, firstMessageID, lastMessageID int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RangeDeleteMessagesFromDLQ", ctx, firstMessageID, lastMessageID)
ret0, _ := ret[0].(error)
return ret0
}
// RangeDeleteMessagesFromDLQ indicates an expected call of RangeDeleteMessagesFromDLQ
func (mr *MockDomainReplicationQueueMockRecorder) RangeDeleteMessagesFromDLQ(ctx, firstMessageID, lastMessageID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RangeDeleteMessagesFromDLQ", reflect.TypeOf((*MockDomainReplicationQueue)(nil).RangeDeleteMessagesFromDLQ), ctx, firstMessageID, lastMessageID)
}
// DeleteMessageFromDLQ mocks base method
func (m *MockDomainReplicationQueue) DeleteMessageFromDLQ(ctx context.Context, messageID int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteMessageFromDLQ", ctx, messageID)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteMessageFromDLQ indicates an expected call of DeleteMessageFromDLQ
func (mr *MockDomainReplicationQueueMockRecorder) DeleteMessageFromDLQ(ctx, messageID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMessageFromDLQ", reflect.TypeOf((*MockDomainReplicationQueue)(nil).DeleteMessageFromDLQ), ctx, messageID)
}