Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- subscribe ∷ ∀ blockVersion x y. LocalSnocket → NetworkMagic → Map NodeToClientVersion blockVersion → NetworkClientSubcriptionTracers → ClientSubscriptionParams () → (NodeToClientVersion → blockVersion → NodeToClientProtocols 'InitiatorMode LocalAddress ByteString IO x y) → IO Void
- data MuxMode where
- data ConnectionId addr
- data LocalAddress
- data NodeToClientProtocols (appType ∷ MuxMode) ntcAddr bytes (m ∷ Type → Type) a b = NodeToClientProtocols {
- localChainSyncProtocol ∷ RunMiniProtocolWithMinimalCtx appType ntcAddr bytes m a b
- localTxSubmissionProtocol ∷ RunMiniProtocolWithMinimalCtx appType ntcAddr bytes m a b
- localStateQueryProtocol ∷ RunMiniProtocolWithMinimalCtx appType ntcAddr bytes m a b
- localTxMonitorProtocol ∷ RunMiniProtocolWithMinimalCtx appType ntcAddr bytes m a b
- data MiniProtocolCb ctx bytes (m ∷ Type → Type) a where
- MiniProtocolCb ∷ ∀ ctx (m ∷ Type → Type) bytes a. (ctx → Channel m bytes → m (a, Maybe bytes)) → MiniProtocolCb ctx bytes m a
- MuxPeer ∷ ∀ (pr ∷ PeerRole) ps (st ∷ ps) failure ctx bytes (m ∷ Type → Type) a. (Show failure, ∀ (st' ∷ ps). Show (ClientHasAgency st'), ∀ (st' ∷ ps). Show (ServerHasAgency st'), ShowProxy ps) ⇒ (ctx → (Tracer m (TraceSendRecv ps), Codec ps failure m bytes, Peer ps pr st m a)) → MiniProtocolCb ctx bytes m a
- MuxPeerPipelined ∷ ∀ (pr ∷ PeerRole) ps (st ∷ ps) failure ctx bytes (m ∷ Type → Type) a. (Show failure, ∀ (st' ∷ ps). Show (ClientHasAgency st'), ∀ (st' ∷ ps). Show (ServerHasAgency st'), ShowProxy ps) ⇒ (ctx → (Tracer m (TraceSendRecv ps), Codec ps failure m bytes, PeerPipelined ps pr st m a)) → MiniProtocolCb ctx bytes m a
- pattern MuxPeerRaw ∷ ∀ ctx bytes m a. (ctx → Channel m bytes → m (a, Maybe bytes)) → MiniProtocolCb ctx bytes m a
- data MuxTrace
- data RunMiniProtocol (mode ∷ MuxMode) initiatorCtx responderCtx bytes (m ∷ Type → Type) a b where
- InitiatorProtocolOnly ∷ ∀ initiatorCtx bytes (m ∷ Type → Type) a responderCtx. MiniProtocolCb initiatorCtx bytes m a → RunMiniProtocol 'InitiatorMode initiatorCtx responderCtx bytes m a Void
- ResponderProtocolOnly ∷ ∀ responderCtx bytes (m ∷ Type → Type) b initiatorCtx. MiniProtocolCb responderCtx bytes m b → RunMiniProtocol 'ResponderMode initiatorCtx responderCtx bytes m Void b
- InitiatorAndResponderProtocol ∷ ∀ initiatorCtx bytes (m ∷ Type → Type) a responderCtx b. MiniProtocolCb initiatorCtx bytes m a → MiniProtocolCb responderCtx bytes m b → RunMiniProtocol 'InitiatorResponderMode initiatorCtx responderCtx bytes m a b
- data WithMuxBearer peerid a
- data ControlMessage
Documentation
∷ ∀ blockVersion x y. LocalSnocket | |
→ NetworkMagic | |
→ Map NodeToClientVersion blockVersion | Use |
→ NetworkClientSubcriptionTracers | |
→ ClientSubscriptionParams () | |
→ (NodeToClientVersion → blockVersion → NodeToClientProtocols 'InitiatorMode LocalAddress ByteString IO x y) | |
→ IO Void |
Subscribe using `node-to-client` mini-protocol.
blockVersion
ought to be instantiated with `BlockNodeToClientVersion blk`.
The callback receives blockVersion
associated with each
NodeToClientVersion
and can be used to create codecs with
clientCodecs
.
data ConnectionId addr Source #
Connection is identified by local and remote address.
TODO: the type variable which this data type fills in is called peerid
. We
should renamed to connectionId
.
Instances
data LocalAddress Source #
Local address, on Unix is associated with AF_UNIX
family, on
Windows with `named-pipes`.
Instances
data NodeToClientProtocols (appType ∷ MuxMode) ntcAddr bytes (m ∷ Type → Type) a b Source #
Record of node-to-client mini protocols.
NodeToClientProtocols | |
|
data MiniProtocolCb ctx bytes (m ∷ Type → Type) a where Source #
A callback executed by each muxed mini-protocol.
MiniProtocolCb ∷ ∀ ctx (m ∷ Type → Type) bytes a. (ctx → Channel m bytes → m (a, Maybe bytes)) → MiniProtocolCb ctx bytes m a | |
MuxPeer ∷ ∀ (pr ∷ PeerRole) ps (st ∷ ps) failure ctx bytes (m ∷ Type → Type) a. (Show failure, ∀ (st' ∷ ps). Show (ClientHasAgency st'), ∀ (st' ∷ ps). Show (ServerHasAgency st'), ShowProxy ps) ⇒ (ctx → (Tracer m (TraceSendRecv ps), Codec ps failure m bytes, Peer ps pr st m a)) → MiniProtocolCb ctx bytes m a | |
MuxPeerPipelined ∷ ∀ (pr ∷ PeerRole) ps (st ∷ ps) failure ctx bytes (m ∷ Type → Type) a. (Show failure, ∀ (st' ∷ ps). Show (ClientHasAgency st'), ∀ (st' ∷ ps). Show (ServerHasAgency st'), ShowProxy ps) ⇒ (ctx → (Tracer m (TraceSendRecv ps), Codec ps failure m bytes, PeerPipelined ps pr st m a)) → MiniProtocolCb ctx bytes m a |
pattern MuxPeerRaw ∷ ∀ ctx bytes m a. (ctx → Channel m bytes → m (a, Maybe bytes)) → MiniProtocolCb ctx bytes m a |
Enumeration of Mux events that can be traced.
data RunMiniProtocol (mode ∷ MuxMode) initiatorCtx responderCtx bytes (m ∷ Type → Type) a b where Source #
RunMiniProtocol
. It also capture context (the IsBigLedgerPeer
) which
is passed to the mini-protocol when a mini-protocol is started.
InitiatorProtocolOnly ∷ ∀ initiatorCtx bytes (m ∷ Type → Type) a responderCtx. MiniProtocolCb initiatorCtx bytes m a → RunMiniProtocol 'InitiatorMode initiatorCtx responderCtx bytes m a Void | |
ResponderProtocolOnly ∷ ∀ responderCtx bytes (m ∷ Type → Type) b initiatorCtx. MiniProtocolCb responderCtx bytes m b → RunMiniProtocol 'ResponderMode initiatorCtx responderCtx bytes m Void b | |
InitiatorAndResponderProtocol ∷ ∀ initiatorCtx bytes (m ∷ Type → Type) a responderCtx b. MiniProtocolCb initiatorCtx bytes m a → MiniProtocolCb responderCtx bytes m b → RunMiniProtocol 'InitiatorResponderMode initiatorCtx responderCtx bytes m a b |
data WithMuxBearer peerid a Source #
Type used for tracing mux events.
Instances
Generic (WithMuxBearer peerid a) | |
Defined in Network.Mux.Trace type Rep (WithMuxBearer peerid a) ∷ Type → Type # from ∷ WithMuxBearer peerid a → Rep (WithMuxBearer peerid a) x # to ∷ Rep (WithMuxBearer peerid a) x → WithMuxBearer peerid a # | |
(Show peerid, Show a) ⇒ Show (WithMuxBearer peerid a) | |
Defined in Network.Mux.Trace showsPrec ∷ Int → WithMuxBearer peerid a → ShowS # show ∷ WithMuxBearer peerid a → String # showList ∷ [WithMuxBearer peerid a] → ShowS # | |
type Rep (WithMuxBearer peerid a) | |
Defined in Network.Mux.Trace type Rep (WithMuxBearer peerid a) = D1 ('MetaData "WithMuxBearer" "Network.Mux.Trace" "network-mux-0.4.5.1-inplace" 'False) (C1 ('MetaCons "WithMuxBearer" 'PrefixI 'True) (S1 ('MetaSel ('Just "wmbPeerId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 peerid) :*: S1 ('MetaSel ('Just "wmbEvent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))) |
data ControlMessage Source #
Control signal sent to a mini-protocol. Expected to exit, on Continue
it
should continue its operation
Continue | Continue operation. |
Quiesce | Hold on, e.g. do not sent messages until resumed. This is not used for any hot protocol. |
Terminate | The client is expected to terminate as soon as possible. |
Instances
Show ControlMessage | |
Defined in Ouroboros.Network.ControlMessage showsPrec ∷ Int → ControlMessage → ShowS # show ∷ ControlMessage → String # showList ∷ [ControlMessage] → ShowS # | |
Eq ControlMessage | |
Defined in Ouroboros.Network.ControlMessage (==) ∷ ControlMessage → ControlMessage → Bool # (/=) ∷ ControlMessage → ControlMessage → Bool # |