ouroboros-network-protocols
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Protocol.PeerSharing.Type

Synopsis

Documentation

newtype PeerSharingAmount Source #

PeerSharing amount new type.

We use Word8 to be faithful to the CDDL specification.

Constructors

PeerSharingAmount 

Fields

Instances

Instances details
Enum PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Generic PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Associated Types

type Rep PeerSharingAmount 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

type Rep PeerSharingAmount = D1 ('MetaData "PeerSharingAmount" "Ouroboros.Network.Protocol.PeerSharing.Type" "ouroboros-network-protocols-0.10.0.2-inplace" 'True) (C1 ('MetaCons "PeerSharingAmount" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))
Num PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Integral PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Real PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Show PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Eq PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Ord PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Serialise PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

type Rep PeerSharingAmount Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

type Rep PeerSharingAmount = D1 ('MetaData "PeerSharingAmount" "Ouroboros.Network.Protocol.PeerSharing.Type" "ouroboros-network-protocols-0.10.0.2-inplace" 'True) (C1 ('MetaCons "PeerSharingAmount" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))

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.

Constructors

PeerSharingResult [peerAddress] 
PeerSharingNotRegisteredYet 

Instances

Instances details
Show peerAddress => Show (PeerSharingResult peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

showsPrec :: Int -> PeerSharingResult peerAddress -> ShowS #

show :: PeerSharingResult peerAddress -> String #

showList :: [PeerSharingResult peerAddress] -> ShowS #

Eq peerAddress => Eq (PeerSharingResult peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

(==) :: PeerSharingResult peerAddress -> PeerSharingResult peerAddress -> Bool #

(/=) :: PeerSharingResult peerAddress -> PeerSharingResult peerAddress -> Bool #

data PeerSharing (peerAddress :: k) where Source #

A kind to identify our protocol, and the types of the states in the state transition diagram of the protocol.

Constructors

StIdle :: forall {k} (peerAddress :: k). PeerSharing peerAddress

The client can send a request and the server is waiting for a request.

StBusy :: forall {k} (peerAddress :: k). PeerSharing peerAddress

The server is responsible for sending response back.

StDone :: forall {k} (peerAddress :: k). PeerSharing peerAddress

Both the client and server are in the terminal state. They're done.

Instances

Instances details
ShowProxy (PeerSharing peer :: Type) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

showProxy :: Proxy (PeerSharing peer) -> String #

Show peerAddress => Show (PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

showsPrec :: Int -> PeerSharing peerAddress -> ShowS #

show :: PeerSharing peerAddress -> String #

showList :: [PeerSharing peerAddress] -> ShowS #

Eq peerAddress => Eq (PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

(==) :: PeerSharing peerAddress -> PeerSharing peerAddress -> Bool #

(/=) :: PeerSharing peerAddress -> PeerSharing peerAddress -> Bool #

Protocol (PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Associated Types

type StateToken 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

type StateToken = SingPeerSharing :: PeerSharing peerAddress -> Type
StateTokenI ('StBusy :: PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

stateToken :: StateToken ('StBusy :: PeerSharing peerAddress) #

StateTokenI ('StDone :: PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

stateToken :: StateToken ('StDone :: PeerSharing peerAddress) #

StateTokenI ('StIdle :: PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

stateToken :: StateToken ('StIdle :: PeerSharing peerAddress) #

NFData peerAddress => NFData (Message (PeerSharing peerAddress) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

rnf :: Message (PeerSharing peerAddress) from to -> () #

Show peer => Show (Message (PeerSharing peer) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

showsPrec :: Int -> Message (PeerSharing peer) from to -> ShowS #

show :: Message (PeerSharing peer) from to -> String #

showList :: [Message (PeerSharing peer) from to] -> ShowS #

data Message (PeerSharing peerAddress) (from :: PeerSharing peerAddress) (to :: PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

data Message (PeerSharing peerAddress) (from :: PeerSharing peerAddress) (to :: PeerSharing peerAddress) where
type StateToken Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

type StateToken = SingPeerSharing :: PeerSharing peerAddress -> Type
type StateAgency ('StBusy :: PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

type StateAgency ('StBusy :: PeerSharing peerAddress) = 'ServerAgency
type StateAgency ('StDone :: PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

type StateAgency ('StDone :: PeerSharing peerAddress) = 'NobodyAgency
type StateAgency ('StIdle :: PeerSharing peerAddress) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

type StateAgency ('StIdle :: PeerSharing peerAddress) = 'ClientAgency

data SingPeerSharing (k1 :: PeerSharing peerAddress) where Source #

Constructors

SingIdle :: forall {k} {peerAddress :: k}. SingPeerSharing ('StIdle :: PeerSharing peerAddress) 
SingBusy :: forall {k} {peerAddress :: k}. SingPeerSharing ('StBusy :: PeerSharing peerAddress) 
SingDone :: forall {k} {peerAddress :: k}. SingPeerSharing ('StDone :: PeerSharing peerAddress) 

Instances

Instances details
Show (SingPeerSharing peerAddress2) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

showsPrec :: Int -> SingPeerSharing peerAddress2 -> ShowS #

show :: SingPeerSharing peerAddress2 -> String #

showList :: [SingPeerSharing peerAddress2] -> ShowS #