forked from couchbase/gocbcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_dispatcher_test.go
117 lines (94 loc) · 2.61 KB
/
mock_dispatcher_test.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
// Code generated by mockery v1.0.0. DO NOT EDIT.
package gocbcore
import mock "github.com/stretchr/testify/mock"
// mockDispatcher is an autogenerated mock type for the dispatcher type
type mockDispatcher struct {
mock.Mock
}
// CollectionsEnabled provides a mock function with given fields:
func (_m *mockDispatcher) CollectionsEnabled() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// DispatchDirect provides a mock function with given fields: req
func (_m *mockDispatcher) DispatchDirect(req *memdQRequest) (PendingOp, error) {
ret := _m.Called(req)
var r0 PendingOp
if rf, ok := ret.Get(0).(func(*memdQRequest) PendingOp); ok {
r0 = rf(req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(PendingOp)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*memdQRequest) error); ok {
r1 = rf(req)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DispatchDirectToAddress provides a mock function with given fields: req, pipeline
func (_m *mockDispatcher) DispatchDirectToAddress(req *memdQRequest, pipeline *memdPipeline) (PendingOp, error) {
ret := _m.Called(req, pipeline)
var r0 PendingOp
if rf, ok := ret.Get(0).(func(*memdQRequest, *memdPipeline) PendingOp); ok {
r0 = rf(req, pipeline)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(PendingOp)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*memdQRequest, *memdPipeline) error); ok {
r1 = rf(req, pipeline)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PipelineSnapshot provides a mock function with given fields:
func (_m *mockDispatcher) PipelineSnapshot() (*pipelineSnapshot, error) {
ret := _m.Called()
var r0 *pipelineSnapshot
if rf, ok := ret.Get(0).(func() *pipelineSnapshot); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*pipelineSnapshot)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RequeueDirect provides a mock function with given fields: req, isRetry
func (_m *mockDispatcher) RequeueDirect(req *memdQRequest, isRetry bool) {
_m.Called(req, isRetry)
}
// SetPostCompleteErrorHandler provides a mock function with given fields: handler
func (_m *mockDispatcher) SetPostCompleteErrorHandler(handler postCompleteErrorHandler) {
_m.Called(handler)
}
// SupportsCollections provides a mock function with given fields:
func (_m *mockDispatcher) SupportsCollections() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}