-
Notifications
You must be signed in to change notification settings - Fork 79
/
netceptor.go
118 lines (100 loc) · 3.54 KB
/
netceptor.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
// Code generated by MockGen. DO NOT EDIT.
// Source: pkg/netceptor/netceptor.go
// Package mock_netceptor is a generated GoMock package.
package mock_netceptor
import (
context "context"
netceptor "github.com/ansible/receptor/pkg/netceptor"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
sync "sync"
time "time"
)
// MockBackend is a mock of Backend interface
type MockBackend struct {
ctrl *gomock.Controller
recorder *MockBackendMockRecorder
}
// MockBackendMockRecorder is the mock recorder for MockBackend
type MockBackendMockRecorder struct {
mock *MockBackend
}
// NewMockBackend creates a new mock instance
func NewMockBackend(ctrl *gomock.Controller) *MockBackend {
mock := &MockBackend{ctrl: ctrl}
mock.recorder = &MockBackendMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockBackend) EXPECT() *MockBackendMockRecorder {
return m.recorder
}
// Start mocks base method
func (m *MockBackend) Start(arg0 context.Context, arg1 *sync.WaitGroup) (chan netceptor.BackendSession, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start", arg0, arg1)
ret0, _ := ret[0].(chan netceptor.BackendSession)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Start indicates an expected call of Start
func (mr *MockBackendMockRecorder) Start(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockBackend)(nil).Start), arg0, arg1)
}
// MockBackendSession is a mock of BackendSession interface
type MockBackendSession struct {
ctrl *gomock.Controller
recorder *MockBackendSessionMockRecorder
}
// MockBackendSessionMockRecorder is the mock recorder for MockBackendSession
type MockBackendSessionMockRecorder struct {
mock *MockBackendSession
}
// NewMockBackendSession creates a new mock instance
func NewMockBackendSession(ctrl *gomock.Controller) *MockBackendSession {
mock := &MockBackendSession{ctrl: ctrl}
mock.recorder = &MockBackendSessionMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockBackendSession) EXPECT() *MockBackendSessionMockRecorder {
return m.recorder
}
// Send mocks base method
func (m *MockBackendSession) Send(arg0 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Send", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Send indicates an expected call of Send
func (mr *MockBackendSessionMockRecorder) Send(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockBackendSession)(nil).Send), arg0)
}
// Recv mocks base method
func (m *MockBackendSession) Recv(arg0 time.Duration) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Recv", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Recv indicates an expected call of Recv
func (mr *MockBackendSessionMockRecorder) Recv(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockBackendSession)(nil).Recv), arg0)
}
// Close mocks base method
func (m *MockBackendSession) 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 *MockBackendSessionMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockBackendSession)(nil).Close))
}