Documentation ¶
Overview ¶
Package peer is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidTopic error returned when the requested topic is not valid. ErrInvalidTopic = errors.New("topic not valid") // ErrInvalidRange error returned when max-min range is not valid. ErrInvalidRange = errors.New("invalid range, Min should be lower or equal to Max") // ErrDiscovererNotProvided error when discoverer is not being provided. ErrDiscovererNotProvided = errors.New("discoverer not provided") )
Functions ¶
This section is empty.
Types ¶
type DiscoverRequest ¶
type DiscoverRequest struct { Topic string `json:"topic"` Max int `json:"max"` Min int `json:"min"` }
DiscoverRequest json request for peer_discover.
type Discoverer ¶
Discoverer manages peer discovery.
type MockDiscoverer ¶
type MockDiscoverer struct {
// contains filtered or unexported fields
}
MockDiscoverer is a mock of Discoverer interface
func NewMockDiscoverer ¶
func NewMockDiscoverer(ctrl *gomock.Controller) *MockDiscoverer
NewMockDiscoverer creates a new mock instance
func (*MockDiscoverer) Discover ¶
func (m *MockDiscoverer) Discover(topic string, max, min int) error
Discover mocks base method
func (*MockDiscoverer) EXPECT ¶
func (m *MockDiscoverer) EXPECT() *MockDiscovererMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockDiscovererMockRecorder ¶
type MockDiscovererMockRecorder struct {
// contains filtered or unexported fields
}
MockDiscovererMockRecorder is the mock recorder for MockDiscoverer
func (*MockDiscovererMockRecorder) Discover ¶
func (mr *MockDiscovererMockRecorder) Discover(topic, max, min interface{}) *gomock.Call
Discover indicates an expected call of Discover
type PublicAPI ¶
type PublicAPI struct {
// contains filtered or unexported fields
}
PublicAPI represents a set of APIs from the `web3.peer` namespace.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service it manages all endpoints for peer operations.
func (*Service) SetDiscoverer ¶
func (s *Service) SetDiscoverer(d Discoverer)
SetDiscoverer sets discoverer for the API calls.
Click to show internal directories.
Click to hide internal directories.