This repository has been archived by the owner on May 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
msg_broker_kafka_internal_mock.go
124 lines (104 loc) · 3.89 KB
/
msg_broker_kafka_internal_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
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2020 Intel Corporation
// Code generated by MockGen. DO NOT EDIT.
// Source: pkg/eaa/msg_broker_kafka_internal_test.go
// Package mock_eaa is a generated GoMock package.
package mock_eaa
import (
context "context"
reflect "reflect"
message "github.com/ThreeDotsLabs/watermill/message"
gomock "github.com/golang/mock/gomock"
)
// MockKafkaPublisher is a mock of KafkaPublisher interface
type MockKafkaPublisher struct {
ctrl *gomock.Controller
recorder *MockKafkaPublisherMockRecorder
}
// MockKafkaPublisherMockRecorder is the mock recorder for MockKafkaPublisher
type MockKafkaPublisherMockRecorder struct {
mock *MockKafkaPublisher
}
// NewMockKafkaPublisher creates a new mock instance
func NewMockKafkaPublisher(ctrl *gomock.Controller) *MockKafkaPublisher {
mock := &MockKafkaPublisher{ctrl: ctrl}
mock.recorder = &MockKafkaPublisherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockKafkaPublisher) EXPECT() *MockKafkaPublisherMockRecorder {
return m.recorder
}
// Publish mocks base method
func (m *MockKafkaPublisher) Publish(topic string, msgs ...*message.Message) error {
m.ctrl.T.Helper()
varargs := []interface{}{topic}
for _, a := range msgs {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Publish", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Publish indicates an expected call of Publish
func (mr *MockKafkaPublisherMockRecorder) Publish(topic interface{}, msgs ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{topic}, msgs...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockKafkaPublisher)(nil).Publish), varargs...)
}
// Close mocks base method
func (m *MockKafkaPublisher) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close
func (mr *MockKafkaPublisherMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockKafkaPublisher)(nil).Close))
}
// MockKafkaSubscriber is a mock of KafkaSubscriber interface
type MockKafkaSubscriber struct {
ctrl *gomock.Controller
recorder *MockKafkaSubscriberMockRecorder
}
// MockKafkaSubscriberMockRecorder is the mock recorder for MockKafkaSubscriber
type MockKafkaSubscriberMockRecorder struct {
mock *MockKafkaSubscriber
}
// NewMockKafkaSubscriber creates a new mock instance
func NewMockKafkaSubscriber(ctrl *gomock.Controller) *MockKafkaSubscriber {
mock := &MockKafkaSubscriber{ctrl: ctrl}
mock.recorder = &MockKafkaSubscriberMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockKafkaSubscriber) EXPECT() *MockKafkaSubscriberMockRecorder {
return m.recorder
}
// Subscribe mocks base method
func (m *MockKafkaSubscriber) Subscribe(ctx context.Context, topic string) (<-chan *message.Message, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Subscribe", ctx, topic)
ret0, _ := ret[0].(<-chan *message.Message)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Subscribe indicates an expected call of Subscribe
func (mr *MockKafkaSubscriberMockRecorder) Subscribe(ctx, topic interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockKafkaSubscriber)(nil).Subscribe), ctx, topic)
}
// Close mocks base method
func (m *MockKafkaSubscriber) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close
func (mr *MockKafkaSubscriberMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockKafkaSubscriber)(nil).Close))
}