package
0.5.0
Repository: https://github.com/mfateev/yarpc-go.git
Documentation: pkg.go.dev

# Functions

ApplyAgentActions runs all the AgentActions on the peer Agent.
ApplyPeerListActions runs all the PeerListActions on the PeerList.
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 MockAgent to release peers through the ReleasePeer function.
ExpectPeerRetains registers expectations on a MockAgent to generate peers on the RetainPeer function.
ExpectPeerRetainsWithError registers expectations on a MockAgent return errors.
NewLightMockPeer returns a new MockPeer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

AddAction is an action for adding a peer to the peerlist.
AgentDeps are passed through all the AgentActions in order to pass certain state in between Actions.
ChooseAction is an action for choosing a peer from the peerlist.
ChooseMultiAction will run ChoosePeer 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.
Mock of Agent interface.
Mock of ChangeListener interface.
Mock of Identifier interface.
Mock of List interface.
Mock of Peer interface.
Mock of Subscriber interface.
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 Agent.
RemoveAction is an action for adding a peer to the peerlist.
RetainAction will execute the RetainPeer method on the Agent.
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.

# Interfaces

AgentAction defines actions that can be applied to an Agent.
PeerListAction defines actions that can be applied to a PeerList.

# 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.