-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
PartitionConsumer.go
144 lines (116 loc) · 3.1 KB
/
PartitionConsumer.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
// Copyright (c) 2018 The Jaeger 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.
package mocks
import (
sarama "github.com/Shopify/sarama"
mock "github.com/stretchr/testify/mock"
)
// PartitionConsumer is an autogenerated mock type for the PartitionConsumer type
type PartitionConsumer struct {
mock.Mock
}
// AsyncClose provides a mock function with given fields:
func (_m *PartitionConsumer) AsyncClose() {
_m.Called()
}
// Close provides a mock function with given fields:
func (_m *PartitionConsumer) Close() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// Errors provides a mock function with given fields:
func (_m *PartitionConsumer) Errors() <-chan *sarama.ConsumerError {
ret := _m.Called()
var r0 <-chan *sarama.ConsumerError
if rf, ok := ret.Get(0).(func() <-chan *sarama.ConsumerError); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(<-chan *sarama.ConsumerError)
}
}
return r0
}
// HighWaterMarkOffset provides a mock function with given fields:
func (_m *PartitionConsumer) HighWaterMarkOffset() int64 {
ret := _m.Called()
var r0 int64
if rf, ok := ret.Get(0).(func() int64); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(int64)
}
return r0
}
// Messages provides a mock function with given fields:
func (_m *PartitionConsumer) Messages() <-chan *sarama.ConsumerMessage {
ret := _m.Called()
var r0 <-chan *sarama.ConsumerMessage
if rf, ok := ret.Get(0).(func() <-chan *sarama.ConsumerMessage); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(<-chan *sarama.ConsumerMessage)
}
}
return r0
}
// Partition provides a mock function with given fields:
func (_m *PartitionConsumer) Partition() int32 {
ret := _m.Called()
var r0 int32
if rf, ok := ret.Get(0).(func() int32); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(int32)
}
return r0
}
// Topic provides a mock function with given fields:
func (_m *PartitionConsumer) Topic() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// NB (yurishkuro): Added the following functions manually as Makefile doesn't show how to auto-gen it.
// Pause mocked.
func (_m *PartitionConsumer) Pause() {
_m.Called()
}
// Resume mocked.
func (_m *PartitionConsumer) Resume() {
_m.Called()
}
// IsPaused mocked.
func (_m *PartitionConsumer) IsPaused() 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
}