| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Network.Protocol.ObjectDiffusion.Outbound
Description
A view of the object diffusion protocol from the point of view of the outbound/server peer.
This provides a view that uses less complex types and should be easier to use than the underlying typed protocol itself.
For execution, objectDiffusionOutboundPeer is provided for conversion
into the typed protocol.
Synopsis
- newtype ObjectDiffusionOutbound objectId object (m :: Type -> Type) a = ObjectDiffusionOutbound {
- runObjectDiffusionOutbound :: m (OutboundStIdle objectId object m a)
- data OutboundStIdle objectId object (m :: Type -> Type) a = OutboundStIdle {
- recvMsgRequestObjectIds :: forall (blocking :: StBlockingStyle). SingBlockingStyle blocking -> NumObjectIdsAck -> NumObjectIdsReq -> m (OutboundStObjectIds blocking objectId object m a)
- recvMsgRequestObjects :: [objectId] -> m (OutboundStObjects objectId object m a)
- recvMsgDone :: m a
- data OutboundStObjectIds (blocking :: StBlockingStyle) objectId object (m :: Type -> Type) a where
- SendMsgReplyObjectIds :: forall (blocking :: StBlockingStyle) objectId object (m :: Type -> Type) a. BlockingReplyList blocking objectId -> OutboundStIdle objectId object m a -> OutboundStObjectIds blocking objectId object m a
- data OutboundStObjects objectId object (m :: Type -> Type) a where
- SendMsgReplyObjects :: forall object objectId (m :: Type -> Type) a. [object] -> OutboundStIdle objectId object m a -> OutboundStObjects objectId object m a
- objectDiffusionOutboundPeer :: forall objectId object (m :: Type -> Type) a. Monad m => ObjectDiffusionOutbound objectId object m a -> Peer (ObjectDiffusion objectId object) 'AsServer 'NonPipelined ('StInit :: ObjectDiffusion objectId object) m a
Protocol type for the outbound
newtype ObjectDiffusionOutbound objectId object (m :: Type -> Type) a Source #
The outbound side of the object diffusion protocol.
The peer in the outbound/server role submits objects to the peer in the inbound/client role.
Constructors
| ObjectDiffusionOutbound | |
Fields
| |
data OutboundStIdle objectId object (m :: Type -> Type) a Source #
In the StIdle protocol state, the outbound does not have agency. Instead
it is waiting for:
- a request for object ids (blocking or non-blocking)
- a request for a given list of objects
- a termination message
It must be prepared to handle any of these.
Constructors
| OutboundStIdle | |
Fields
| |
data OutboundStObjectIds (blocking :: StBlockingStyle) objectId object (m :: Type -> Type) a where Source #
Constructors
| SendMsgReplyObjectIds :: forall (blocking :: StBlockingStyle) objectId object (m :: Type -> Type) a. BlockingReplyList blocking objectId -> OutboundStIdle objectId object m a -> OutboundStObjectIds blocking objectId object m a |
data OutboundStObjects objectId object (m :: Type -> Type) a where Source #
Constructors
| SendMsgReplyObjects :: forall object objectId (m :: Type -> Type) a. [object] -> OutboundStIdle objectId object m a -> OutboundStObjects objectId object m a |
Execution as a typed protocol
objectDiffusionOutboundPeer :: forall objectId object (m :: Type -> Type) a. Monad m => ObjectDiffusionOutbound objectId object m a -> Peer (ObjectDiffusion objectId object) 'AsServer 'NonPipelined ('StInit :: ObjectDiffusion objectId object) m a Source #
A non-pipelined Peer representing the ObjectDiffusionOutbound.