mocks

package
v1.0.0-beta5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDiscoveryPeerEndpoint

type MockDiscoveryPeerEndpoint struct {
	MSPID        string
	Endpoint     string
	LedgerHeight uint64
}

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

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

WithPeers adds a set of mock peers to the MockDiscoveryServer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL