forked from scionproto/scion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beaconing.go
141 lines (119 loc) · 5.01 KB
/
beaconing.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/scionproto/scion/go/beacon_srv/internal/beaconing (interfaces: BeaconInserter,BeaconProvider,SegmentProvider)
// Package mock_beaconing is a generated GoMock package.
package mock_beaconing
import (
context "context"
gomock "github.com/golang/mock/gomock"
beacon "github.com/scionproto/scion/go/beacon_srv/internal/beacon"
proto "github.com/scionproto/scion/go/proto"
reflect "reflect"
)
// MockBeaconInserter is a mock of BeaconInserter interface
type MockBeaconInserter struct {
ctrl *gomock.Controller
recorder *MockBeaconInserterMockRecorder
}
// MockBeaconInserterMockRecorder is the mock recorder for MockBeaconInserter
type MockBeaconInserterMockRecorder struct {
mock *MockBeaconInserter
}
// NewMockBeaconInserter creates a new mock instance
func NewMockBeaconInserter(ctrl *gomock.Controller) *MockBeaconInserter {
mock := &MockBeaconInserter{ctrl: ctrl}
mock.recorder = &MockBeaconInserterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockBeaconInserter) EXPECT() *MockBeaconInserterMockRecorder {
return m.recorder
}
// InsertBeacon mocks base method
func (m *MockBeaconInserter) InsertBeacon(arg0 context.Context, arg1 beacon.Beacon) (beacon.InsertStats, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InsertBeacon", arg0, arg1)
ret0, _ := ret[0].(beacon.InsertStats)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// InsertBeacon indicates an expected call of InsertBeacon
func (mr *MockBeaconInserterMockRecorder) InsertBeacon(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertBeacon", reflect.TypeOf((*MockBeaconInserter)(nil).InsertBeacon), arg0, arg1)
}
// PreFilter mocks base method
func (m *MockBeaconInserter) PreFilter(arg0 beacon.Beacon) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PreFilter", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// PreFilter indicates an expected call of PreFilter
func (mr *MockBeaconInserterMockRecorder) PreFilter(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreFilter", reflect.TypeOf((*MockBeaconInserter)(nil).PreFilter), arg0)
}
// MockBeaconProvider is a mock of BeaconProvider interface
type MockBeaconProvider struct {
ctrl *gomock.Controller
recorder *MockBeaconProviderMockRecorder
}
// MockBeaconProviderMockRecorder is the mock recorder for MockBeaconProvider
type MockBeaconProviderMockRecorder struct {
mock *MockBeaconProvider
}
// NewMockBeaconProvider creates a new mock instance
func NewMockBeaconProvider(ctrl *gomock.Controller) *MockBeaconProvider {
mock := &MockBeaconProvider{ctrl: ctrl}
mock.recorder = &MockBeaconProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockBeaconProvider) EXPECT() *MockBeaconProviderMockRecorder {
return m.recorder
}
// BeaconsToPropagate mocks base method
func (m *MockBeaconProvider) BeaconsToPropagate(arg0 context.Context) (<-chan beacon.BeaconOrErr, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BeaconsToPropagate", arg0)
ret0, _ := ret[0].(<-chan beacon.BeaconOrErr)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// BeaconsToPropagate indicates an expected call of BeaconsToPropagate
func (mr *MockBeaconProviderMockRecorder) BeaconsToPropagate(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeaconsToPropagate", reflect.TypeOf((*MockBeaconProvider)(nil).BeaconsToPropagate), arg0)
}
// MockSegmentProvider is a mock of SegmentProvider interface
type MockSegmentProvider struct {
ctrl *gomock.Controller
recorder *MockSegmentProviderMockRecorder
}
// MockSegmentProviderMockRecorder is the mock recorder for MockSegmentProvider
type MockSegmentProviderMockRecorder struct {
mock *MockSegmentProvider
}
// NewMockSegmentProvider creates a new mock instance
func NewMockSegmentProvider(ctrl *gomock.Controller) *MockSegmentProvider {
mock := &MockSegmentProvider{ctrl: ctrl}
mock.recorder = &MockSegmentProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockSegmentProvider) EXPECT() *MockSegmentProviderMockRecorder {
return m.recorder
}
// SegmentsToRegister mocks base method
func (m *MockSegmentProvider) SegmentsToRegister(arg0 context.Context, arg1 proto.PathSegType) (<-chan beacon.BeaconOrErr, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SegmentsToRegister", arg0, arg1)
ret0, _ := ret[0].(<-chan beacon.BeaconOrErr)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SegmentsToRegister indicates an expected call of SegmentsToRegister
func (mr *MockSegmentProviderMockRecorder) SegmentsToRegister(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SegmentsToRegister", reflect.TypeOf((*MockSegmentProvider)(nil).SegmentsToRegister), arg0, arg1)
}