dmq-node
Safe HaskellNone
LanguageHaskell2010

DMQ.NodeToNode

Documentation

type ClientApp addr (m :: Type -> Type) a = NodeToNodeVersion -> ExpandedInitiatorContext addr m -> Channel m ByteString -> m (a, Maybe ByteString) Source #

type ServerApp addr (m :: Type -> Type) a = NodeToNodeVersion -> ResponderContext addr -> Channel m ByteString -> m (a, Maybe ByteString) Source #

data Apps addr (m :: Type -> Type) a b Source #

Constructors

Apps 

Fields

ntnApps :: forall crypto (m :: Type -> Type) addr. (Crypto crypto, Typeable crypto, Alternative (STM m), MonadAsync m, MonadDelay m, MonadFork m, MonadMask m, MonadMVar m, MonadThrow (STM m), MonadTimer m, Ord addr, Show addr, Hashable addr, ToJSON addr) => (forall ev. ToJSON ev => Tracer m (WithEventType ev)) -> Configuration -> NodeKernel crypto addr m -> Codecs crypto addr m -> LimitsAndTimeouts crypto addr -> TxDecisionPolicy -> Apps addr m () () Source #

data Protocols (appType :: Mode) initiatorCtx responderCtx bytes (m :: Type -> Type) a b Source #

Constructors

Protocols 

Fields

  • sigSubmissionProtocol :: RunMiniProtocol appType initiatorCtx responderCtx bytes m a b
     
  • keepAliveProtocol :: RunMiniProtocol appType initiatorCtx responderCtx bytes m a b

    keep-alive mini-protocol

  • peerSharingProtocol :: RunMiniProtocol appType initiatorCtx responderCtx bytes m a b

    peer sharing mini-protocol

nodeToNodeProtocols Source #

Arguments

:: forall crypto addr (appType :: Mode) initiatorCtx responderCtx bytes (m :: Type -> Type) a b. LimitsAndTimeouts crypto addr 
-> Protocols appType initiatorCtx responderCtx bytes m a b 
-> NodeToNodeVersion

negotiated version number

-> NodeToNodeVersionData

negotiated version data

-> OuroborosBundle appType initiatorCtx responderCtx bytes m a b 

initiatorProtocols :: forall crypto addr (m :: Type -> Type) a b. LimitsAndTimeouts crypto addr -> Apps addr m a b -> NodeToNodeVersion -> NodeToNodeVersionData -> OuroborosBundleWithExpandedCtx 'InitiatorMode addr ByteString m a Void Source #

initiatorAndResponderProtocols :: forall crypto addr (m :: Type -> Type) a b. LimitsAndTimeouts crypto addr -> Apps addr m a b -> NodeToNodeVersion -> NodeToNodeVersionData -> OuroborosBundleWithExpandedCtx 'InitiatorResponderMode addr ByteString m a b Source #

dmqCodecs :: forall crypto (m :: Type -> Type) addr. (Crypto crypto, MonadST m) => (addr -> Encoding) -> (forall s. Decoder s addr) -> Codecs crypto addr m Source #

data LimitsAndTimeouts crypto addr Source #

type HandshakeTr ntnAddr = WithBearer (ConnectionId ntnAddr) (TraceSendRecv (Handshake NodeToNodeVersion Term)) Source #

ntnHandshakeArguments :: forall (m :: Type -> Type) ntnAddr. MonadST m => Tracer m (HandshakeTr ntnAddr) -> HandshakeArguments (ConnectionId ntnAddr) NodeToNodeVersion NodeToNodeVersionData m Source #