Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDiscoveryPeerEndpoint ¶
MockDiscoveryPeerEndpoint contains information about a Discover peer endpoint
type MockDiscoveryServer ¶
type MockDiscoveryServer struct {
// contains filtered or unexported fields
}
MockDiscoveryServer is a mock Discovery server
func NewServer ¶
func NewServer(opts ...MockDiscoveryServerOpt) *MockDiscoveryServer
NewServer returns a new MockDiscoveryServer
func (*MockDiscoveryServer) Discover ¶
func (s *MockDiscoveryServer) Discover(ctx context.Context, request *discovery.SignedRequest) (*discovery.Response, error)
Discover Processes the given Discovery request and returns a mock response
type MockDiscoveryServerOpt ¶
type MockDiscoveryServerOpt func(s *MockDiscoveryServer)
MockDiscoveryServerOpt is an option for the MockDiscoveryServer
func WithLocalPeers ¶
func WithLocalPeers(peers ...*MockDiscoveryPeerEndpoint) MockDiscoveryServerOpt
WithLocalPeers adds a set of mock peers to the MockDiscoveryServer
func WithPeers ¶
func WithPeers(peers ...*MockDiscoveryPeerEndpoint) MockDiscoveryServerOpt
WithPeers adds a set of mock peers to the MockDiscoveryServer
Click to show internal directories.
Click to hide internal directories.