| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Network.Protocol.ObjectDiffusion.Inbound
Description
A view of the object diffusion protocol from the point of view of the inbound/client peer.
This provides a view that uses less complex types and should be easier to use than the underlying typed protocol itself.
For execution, a conversion into the typed protocol is provided.
Synopsis
- data ObjectDiffusionInboundPipelined objectId object (m :: Type -> Type) a where
- ObjectDiffusionInboundPipelined :: forall objectId object (m :: Type -> Type) a. InboundStIdle 'Z objectId object m a -> ObjectDiffusionInboundPipelined objectId object m a
- data InboundStIdle (n :: N) objectId object (m :: Type -> Type) a where
- SendMsgRequestObjectIdsBlocking :: forall objectId object (m :: Type -> Type) a. NumObjectIdsAck -> NumObjectIdsReq -> (NonEmpty objectId -> InboundStIdle 'Z objectId object m a) -> InboundStIdle 'Z objectId object m a
- SendMsgRequestObjectIdsPipelined :: forall (n :: N) objectId object (m :: Type -> Type) a. NumObjectIdsAck -> NumObjectIdsReq -> InboundStIdle ('S n) objectId object m a -> InboundStIdle n objectId object m a
- SendMsgRequestObjectsPipelined :: forall objectId (n :: N) object (m :: Type -> Type) a. [objectId] -> InboundStIdle ('S n) objectId object m a -> InboundStIdle n objectId object m a
- CollectPipelined :: forall (n1 :: N) objectId object (m :: Type -> Type) a. Maybe (InboundStIdle ('S n1) objectId object m a) -> (Collect objectId object -> InboundStIdle n1 objectId object m a) -> InboundStIdle ('S n1) objectId object m a
- SendMsgDone :: forall a objectId object (m :: Type -> Type). a -> InboundStIdle 'Z objectId object m a
- WithEffect :: forall (m :: Type -> Type) (n :: N) objectId object a. m (InboundStIdle n objectId object m a) -> InboundStIdle n objectId object m a
- data Collect objectId object
- = CollectObjectIds NumObjectIdsReq [objectId]
- | CollectObjects [objectId] [object]
- objectDiffusionInboundPeerPipelined :: forall objectId object (m :: Type -> Type) a. Functor m => ObjectDiffusionInboundPipelined objectId object m a -> PeerPipelined (ObjectDiffusion objectId object) 'AsClient ('StInit :: ObjectDiffusion objectId object) m a
Protocol type for the inbound
data ObjectDiffusionInboundPipelined objectId object (m :: Type -> Type) a where Source #
Constructors
| ObjectDiffusionInboundPipelined :: forall objectId object (m :: Type -> Type) a. InboundStIdle 'Z objectId object m a -> ObjectDiffusionInboundPipelined objectId object m a |
data InboundStIdle (n :: N) objectId object (m :: Type -> Type) a where Source #
Constructors
| SendMsgRequestObjectIdsBlocking | |
Fields
| |
| SendMsgRequestObjectIdsPipelined :: forall (n :: N) objectId object (m :: Type -> Type) a. NumObjectIdsAck -> NumObjectIdsReq -> InboundStIdle ('S n) objectId object m a -> InboundStIdle n objectId object m a | |
| SendMsgRequestObjectsPipelined :: forall objectId (n :: N) object (m :: Type -> Type) a. [objectId] -> InboundStIdle ('S n) objectId object m a -> InboundStIdle n objectId object m a | |
| CollectPipelined :: forall (n1 :: N) objectId object (m :: Type -> Type) a. Maybe (InboundStIdle ('S n1) objectId object m a) -> (Collect objectId object -> InboundStIdle n1 objectId object m a) -> InboundStIdle ('S n1) objectId object m a | |
| SendMsgDone :: forall a objectId object (m :: Type -> Type). a -> InboundStIdle 'Z objectId object m a | |
| WithEffect :: forall (m :: Type -> Type) (n :: N) objectId object a. m (InboundStIdle n objectId object m a) -> InboundStIdle n objectId object m a | |
data Collect objectId object Source #
This is the type of the pipelined results, collected by CollectPipelined.
This protocol can pipeline requests for object ids and objects,
so we use a sum of either for collecting the responses.
Constructors
| CollectObjectIds NumObjectIdsReq [objectId] | The result of |
| CollectObjects [objectId] [object] | The result of |
Execution as a typed protocol
objectDiffusionInboundPeerPipelined :: forall objectId object (m :: Type -> Type) a. Functor m => ObjectDiffusionInboundPipelined objectId object m a -> PeerPipelined (ObjectDiffusion objectId object) 'AsClient ('StInit :: ObjectDiffusion objectId object) m a Source #
Transform a ObjectDiffusionInboundPipelined into a PeerPipelined.