-
Notifications
You must be signed in to change notification settings - Fork 2k
/
mock_refresh.go
148 lines (125 loc) · 5.28 KB
/
mock_refresh.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
// Code generated by MockGen. DO NOT EDIT.
// Source: go/vt/vtgr/controller/refresh.go
package controller
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
context "golang.org/x/net/context"
topodata "vitess.io/vitess/go/vt/proto/topodata"
topo "vitess.io/vitess/go/vt/topo"
)
// MockGRTopo is a mock of GRTopo interface.
type MockGRTopo struct {
ctrl *gomock.Controller
recorder *MockGRTopoMockRecorder
}
// MockGRTopoMockRecorder is the mock recorder for MockGRTopo.
type MockGRTopoMockRecorder struct {
mock *MockGRTopo
}
// NewMockGRTopo creates a new mock instance.
func NewMockGRTopo(ctrl *gomock.Controller) *MockGRTopo {
mock := &MockGRTopo{ctrl: ctrl}
mock.recorder = &MockGRTopoMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGRTopo) EXPECT() *MockGRTopoMockRecorder {
return m.recorder
}
// GetShard mocks base method.
func (m *MockGRTopo) GetShard(ctx context.Context, keyspace, shard string) (*topo.ShardInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetShard", ctx, keyspace, shard)
ret0, _ := ret[0].(*topo.ShardInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetShard indicates an expected call of GetShard.
func (mr *MockGRTopoMockRecorder) GetShard(ctx, keyspace, shard interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetShard", reflect.TypeOf((*MockGRTopo)(nil).GetShard), ctx, keyspace, shard)
}
// GetShardNames mocks base method.
func (m *MockGRTopo) GetShardNames(ctx context.Context, keyspace string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetShardNames", ctx, keyspace)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetShardNames indicates an expected call of GetShardNames.
func (mr *MockGRTopoMockRecorder) GetShardNames(ctx, keyspace interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetShardNames", reflect.TypeOf((*MockGRTopo)(nil).GetShardNames), ctx, keyspace)
}
// GetTabletMapForShardByCell mocks base method.
func (m *MockGRTopo) GetTabletMapForShardByCell(ctx context.Context, keyspace, shard string, cells []string) (map[string]*topo.TabletInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetTabletMapForShardByCell", ctx, keyspace, shard, cells)
ret0, _ := ret[0].(map[string]*topo.TabletInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetTabletMapForShardByCell indicates an expected call of GetTabletMapForShardByCell.
func (mr *MockGRTopoMockRecorder) GetTabletMapForShardByCell(ctx, keyspace, shard, cells interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTabletMapForShardByCell", reflect.TypeOf((*MockGRTopo)(nil).GetTabletMapForShardByCell), ctx, keyspace, shard, cells)
}
// LockShard mocks base method.
func (m *MockGRTopo) LockShard(ctx context.Context, keyspace, shard, action string) (context.Context, func(*error), error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LockShard", ctx, keyspace, shard, action)
ret0, _ := ret[0].(context.Context)
ret1, _ := ret[1].(func(*error))
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// LockShard indicates an expected call of LockShard.
func (mr *MockGRTopoMockRecorder) LockShard(ctx, keyspace, shard, action interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LockShard", reflect.TypeOf((*MockGRTopo)(nil).LockShard), ctx, keyspace, shard, action)
}
// MockGRTmcClient is a mock of GRTmcClient interface.
type MockGRTmcClient struct {
ctrl *gomock.Controller
recorder *MockGRTmcClientMockRecorder
}
// MockGRTmcClientMockRecorder is the mock recorder for MockGRTmcClient.
type MockGRTmcClientMockRecorder struct {
mock *MockGRTmcClient
}
// NewMockGRTmcClient creates a new mock instance.
func NewMockGRTmcClient(ctrl *gomock.Controller) *MockGRTmcClient {
mock := &MockGRTmcClient{ctrl: ctrl}
mock.recorder = &MockGRTmcClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGRTmcClient) EXPECT() *MockGRTmcClientMockRecorder {
return m.recorder
}
// ChangeType mocks base method.
func (m *MockGRTmcClient) ChangeType(ctx context.Context, tablet *topodata.Tablet, dbType topodata.TabletType, semiSync bool) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChangeType", ctx, tablet, dbType)
ret0, _ := ret[0].(error)
return ret0
}
// ChangeType indicates an expected call of ChangeType.
func (mr *MockGRTmcClientMockRecorder) ChangeType(ctx, tablet, dbType interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeType", reflect.TypeOf((*MockGRTmcClient)(nil).ChangeType), ctx, tablet, dbType)
}
// Ping mocks base method.
func (m *MockGRTmcClient) Ping(ctx context.Context, tablet *topodata.Tablet) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Ping", ctx, tablet)
ret0, _ := ret[0].(error)
return ret0
}
// Ping indicates an expected call of Ping.
func (mr *MockGRTmcClientMockRecorder) Ping(ctx, tablet interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockGRTmcClient)(nil).Ping), ctx, tablet)
}