-
Notifications
You must be signed in to change notification settings - Fork 2
/
net.go
92 lines (78 loc) · 2.44 KB
/
net.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
// Code generated by MockGen. DO NOT EDIT.
// Source: net/host.go
// Package mocks is a generated GoMock package.
package mocks
import (
gomock "github.com/golang/mock/gomock"
core "github.com/libp2p/go-libp2p-core"
peer "github.com/libp2p/go-libp2p-core/peer"
multiaddr "github.com/multiformats/go-multiaddr"
reflect "reflect"
)
// MockHost is a mock of Host interface
type MockHost struct {
ctrl *gomock.Controller
recorder *MockHostMockRecorder
}
// MockHostMockRecorder is the mock recorder for MockHost
type MockHostMockRecorder struct {
mock *MockHost
}
// NewMockHost creates a new mock instance
func NewMockHost(ctrl *gomock.Controller) *MockHost {
mock := &MockHost{ctrl: ctrl}
mock.recorder = &MockHostMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockHost) EXPECT() *MockHostMockRecorder {
return m.recorder
}
// Get mocks base method
func (m *MockHost) Get() core.Host {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get")
ret0, _ := ret[0].(core.Host)
return ret0
}
// Get indicates an expected call of Get
func (mr *MockHostMockRecorder) Get() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockHost)(nil).Get))
}
// ID mocks base method
func (m *MockHost) ID() peer.ID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ID")
ret0, _ := ret[0].(peer.ID)
return ret0
}
// ID indicates an expected call of ID
func (mr *MockHostMockRecorder) ID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockHost)(nil).ID))
}
// Addrs mocks base method
func (m *MockHost) Addrs() []multiaddr.Multiaddr {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Addrs")
ret0, _ := ret[0].([]multiaddr.Multiaddr)
return ret0
}
// Addrs indicates an expected call of Addrs
func (mr *MockHostMockRecorder) Addrs() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addrs", reflect.TypeOf((*MockHost)(nil).Addrs))
}
// FullAddr mocks base method
func (m *MockHost) FullAddr() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FullAddr")
ret0, _ := ret[0].(string)
return ret0
}
// FullAddr indicates an expected call of FullAddr
func (mr *MockHostMockRecorder) FullAddr() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FullAddr", reflect.TypeOf((*MockHost)(nil).FullAddr))
}