# Functions
ApplyPeerListActions runs all the PeerListActions on the PeerList.
ApplyTransportActions runs all the TransportActions on the peer Transport.
CreatePeerIDs takes a slice of peerID strings and returns a slice of PeerIdentifiers.
CreateSubscriberMap will take a slice of SubscriberDefinitions and return a map of IDs to MockPeerSubscribers.
ExpectPeerReleases registers expectations on a MockTransport to release peers through the ReleasePeer function.
ExpectPeerRetains registers expectations on a MockTransport to generate peers on the RetainPeer function.
ExpectPeerRetainsWithError registers expectations on a MockTransport return errors.
NewLightMockPeer returns a new MockPeer.
NewMockChooser creates a new mock instance.
NewMockChooserList creates a new mock instance.
NewMockIdentifier creates a new mock instance.
NewMockList creates a new mock instance.
NewMockPeer creates a new mock instance.
NewMockSubscriber creates a new mock instance.
NewMockTransport creates a new mock instance.
# Structs
ChooseAction is an action for choosing a peer from the peerlist.
ChooseMultiAction will run Choose multiple times on the PeerList It will assert if there are ANY failures.
ConcurrentAction will run a series of actions in parallel.
LightMockPeer is a small simple wrapper around the Peer interface for mocking and changing a peer's attributes MockPeer is NOT thread safe.
ListActionDeps are passed through PeerListActions' Apply methods in order to allow the PeerListAction to modify state other than just the PeerList.
MockChooser is a mock of Chooser interface.
MockChooserList is a mock of ChooserList interface.
MockChooserListMockRecorder is the mock recorder for MockChooserList.
MockChooserMockRecorder is the mock recorder for MockChooser.
MockIdentifier is a mock of Identifier interface.
MockIdentifierMockRecorder is the mock recorder for MockIdentifier.
MockList is a mock of List interface.
MockListMockRecorder is the mock recorder for MockList.
MockPeer is a mock of Peer interface.
MockPeerMockRecorder is the mock recorder for MockPeer.
MockSubscriber is a mock of Subscriber interface.
MockSubscriberMockRecorder is the mock recorder for MockSubscriber.
MockTransport is a mock of Transport interface.
MockTransportMockRecorder is the mock recorder for MockTransport.
NotifyStatusChangeAction will run the NotifyStatusChange function on a PeerList with a specified Peer after changing the peer's ConnectionStatus.
ReleaseAction will execute the ReleasePeer method on the Transport.
RetainAction will execute the RetainPeer method on the Transport.
StartAction is an action for testing PeerList.Start.
StopAction is an action for testing PeerList.Stop.
SubscriberDefinition is an abstraction for defining a PeerSubscriber with an ID so it can be referenced later.
TransportDeps are passed through all the TransportActions in order to pass certain state in between Actions.
UpdateAction is an action for adding/removing multiple peers on the PeerList.
# Interfaces
PeerListAction defines actions that can be applied to a PeerList.
TransportAction defines actions that can be applied to an Transport.
# Type aliases
MockPeerIdentifier is a small wrapper around the PeerIdentifier interfaces for a string unfortunately gomock + assert.Equal has difficulty seeing between mock objects of the same type.
PeerIdentifierMatcher is used to match a Peer/PeerIdentifier by comparing The peer's .Identifier function with the Matcher string.