Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PeerSharingAmount = PeerSharingAmount {}
- data PeerSharingResult peerAddress
- = PeerSharingResult [peerAddress]
- | PeerSharingNotRegisteredYet
- data PeerSharing peerAddress where
- StIdle ∷ PeerSharing peerAddress
- StBusy ∷ PeerSharing peerAddress
- StDone ∷ PeerSharing peerAddress
Documentation
newtype PeerSharingAmount Source #
PeerSharing amount new type.
We use Word8
to be faithful to the CDDL specification.
Instances
data PeerSharingResult peerAddress Source #
PeerSharing Result type.
We need a constructor for the case when the Governor wins the race versus the Mux (when initialising the peer sharing miniprotocol). This leads the Governor to lookup a peer that hasn't been registered yet.
PeerSharingResult [peerAddress] | |
PeerSharingNotRegisteredYet |
Instances
Show peerAddress ⇒ Show (PeerSharingResult peerAddress) Source # | |
Defined in Ouroboros.Network.Protocol.PeerSharing.Type showsPrec ∷ Int → PeerSharingResult peerAddress → ShowS # show ∷ PeerSharingResult peerAddress → String # showList ∷ [PeerSharingResult peerAddress] → ShowS # | |
Eq peerAddress ⇒ Eq (PeerSharingResult peerAddress) Source # | |
Defined in Ouroboros.Network.Protocol.PeerSharing.Type (==) ∷ PeerSharingResult peerAddress → PeerSharingResult peerAddress → Bool # (/=) ∷ PeerSharingResult peerAddress → PeerSharingResult peerAddress → Bool # |
data PeerSharing peerAddress where Source #
A kind to identify our protocol, and the types of the states in the state transition diagram of the protocol.
StIdle ∷ PeerSharing peerAddress | The client can send a request and the server is waiting for a request. |
StBusy ∷ PeerSharing peerAddress | The server is responsible for sending response back. |
StDone ∷ PeerSharing peerAddress | Both the client and server are in the terminal state. They're done. |