/
zookeeper_mock.go
161 lines (137 loc) · 5.44 KB
/
zookeeper_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
//
// Copyright 2021 Layotto Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by MockGen. DO NOT EDIT.
// Source: zookeeper.go
// Package utils is a generated GoMock package.
package mock
import (
reflect "reflect"
time "time"
"mosn.io/layotto/components/pkg/utils"
zk "github.com/go-zookeeper/zk"
gomock "github.com/golang/mock/gomock"
)
// MockConnectionFactory is a mock of ConnectionFactory interface.
type MockConnectionFactory struct {
ctrl *gomock.Controller
recorder *MockConnectionFactoryMockRecorder
}
// MockConnectionFactoryMockRecorder is the mock recorder for MockConnectionFactory.
type MockConnectionFactoryMockRecorder struct {
mock *MockConnectionFactory
}
// NewMockConnectionFactory creates a new mock instance.
func NewMockConnectionFactory(ctrl *gomock.Controller) *MockConnectionFactory {
mock := &MockConnectionFactory{ctrl: ctrl}
mock.recorder = &MockConnectionFactoryMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockConnectionFactory) EXPECT() *MockConnectionFactoryMockRecorder {
return m.recorder
}
// NewConnection mocks base method.
func (m *MockConnectionFactory) NewConnection(expire time.Duration, meta utils.ZookeeperMetadata) (utils.ZKConnection, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewConnection", expire, meta)
ret0, _ := ret[0].(utils.ZKConnection)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NewConnection indicates an expected call of NewConnection.
func (mr *MockConnectionFactoryMockRecorder) NewConnection(expire, meta interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewConnection", reflect.TypeOf((*MockConnectionFactory)(nil).NewConnection), expire, meta)
}
// MockZKConnection is a mock of ZKConnection interface.
type MockZKConnection struct {
ctrl *gomock.Controller
recorder *MockZKConnectionMockRecorder
}
// MockZKConnectionMockRecorder is the mock recorder for MockZKConnection.
type MockZKConnectionMockRecorder struct {
mock *MockZKConnection
}
// NewMockZKConnection creates a new mock instance.
func NewMockZKConnection(ctrl *gomock.Controller) *MockZKConnection {
mock := &MockZKConnection{ctrl: ctrl}
mock.recorder = &MockZKConnectionMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockZKConnection) EXPECT() *MockZKConnectionMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockZKConnection) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close.
func (mr *MockZKConnectionMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockZKConnection)(nil).Close))
}
// Create mocks base method.
func (m *MockZKConnection) Create(path string, data []byte, flags int32, acl []zk.ACL) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", path, data, flags, acl)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Create indicates an expected call of Create.
func (mr *MockZKConnectionMockRecorder) Create(path, data, flags, acl interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockZKConnection)(nil).Create), path, data, flags, acl)
}
// Delete mocks base method.
func (m *MockZKConnection) Delete(path string, version int32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", path, version)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockZKConnectionMockRecorder) Delete(path, version interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockZKConnection)(nil).Delete), path, version)
}
// Get mocks base method.
func (m *MockZKConnection) Get(path string) ([]byte, *zk.Stat, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", path)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(*zk.Stat)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Get indicates an expected call of Get.
func (mr *MockZKConnectionMockRecorder) Get(path interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockZKConnection)(nil).Get), path)
}
// Set mocks base method.
func (m *MockZKConnection) Set(path string, data []byte, version int32) (*zk.Stat, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Set", path, data, version)
ret0, _ := ret[0].(*zk.Stat)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Set indicates an expected call of Set.
func (mr *MockZKConnectionMockRecorder) Set(path, data, version interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockZKConnection)(nil).Set), path, data, version)
}