Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data P2P
- data DiffusionTracer ntnAddr ntcAddr
- = RunServer (NonEmpty ntnAddr)
- | RunLocalServer ntcAddr
- | UsingSystemdSocket ntcAddr
- | CreateSystemdSocketForSnocketPath ntcAddr
- | CreatedLocalSocket ntcAddr
- | ConfiguringLocalSocket ntcAddr FileDescriptor
- | ListeningLocalSocket ntcAddr FileDescriptor
- | LocalSocketUp ntcAddr FileDescriptor
- | CreatingServerSocket ntnAddr
- | ConfiguringServerSocket ntnAddr
- | ListeningServerSocket ntnAddr
- | ServerSocketUp ntnAddr
- | UnsupportedLocalSystemdSocket ntnAddr
- | UnsupportedReadySocketCase
- | DiffusionErrored SomeException
- | SystemdSocketConfiguration SystemdSocketTracer
- data Tracers ntnAddr ntnVersion ntcAddr ntcVersion (m :: Type -> Type) = Tracers {
- dtMuxTracer :: Tracer m (WithBearer (ConnectionId ntnAddr) Trace)
- dtHandshakeTracer :: Tracer m (HandshakeTr ntnAddr ntnVersion)
- dtLocalMuxTracer :: Tracer m (WithBearer (ConnectionId ntcAddr) Trace)
- dtLocalHandshakeTracer :: Tracer m (HandshakeTr ntcAddr ntcVersion)
- dtDiffusionTracer :: Tracer m (DiffusionTracer ntnAddr ntcAddr)
- nullTracers :: forall (m :: Type -> Type) ntnAddr ntnVersion ntcAddr ntcVersion. Applicative m => Tracers ntnAddr ntnVersion ntcAddr ntcVersion m
- data ExtraTracers (p2p :: P2P) where
- data Failure where
- UnsupportedReadySocket :: Failure
- UnexpectedIPv4Address :: forall ntnAddr. (Show ntnAddr, Typeable ntnAddr) => ntnAddr -> Failure
- UnexpectedIPv6Address :: forall ntnAddr. (Show ntnAddr, Typeable ntnAddr) => ntnAddr -> Failure
- NoSocket :: Failure
- DiffusionError :: SomeException -> Failure
- data Arguments (m :: Type -> Type) ntnFd ntnAddr ntcFd ntcAddr = Arguments {
- daIPv4Address :: Maybe (Either ntnFd ntnAddr)
- daIPv6Address :: Maybe (Either ntnFd ntnAddr)
- daLocalAddress :: Maybe (Either ntcFd ntcAddr)
- daAcceptedConnectionsLimit :: AcceptedConnectionsLimit
- daMode :: DiffusionMode
- daPublicPeerSelectionVar :: StrictTVar m (PublicPeerSelectionState ntnAddr)
- data ExtraArguments (p2p :: P2P) (m :: Type -> Type) where
- P2PArguments :: forall (m :: Type -> Type). ArgumentsExtra m -> ExtraArguments 'P2P m
- NonP2PArguments :: forall (m :: Type -> Type). ArgumentsExtra -> ExtraArguments 'NonP2P m
- data Applications ntnAddr ntnVersion ntnVersionData ntcAddr ntcVersion ntcVersionData (m :: Type -> Type) a = Applications {
- daApplicationInitiatorMode :: Versions ntnVersion ntnVersionData (OuroborosBundleWithExpandedCtx 'InitiatorMode ntnAddr ByteString m a Void)
- daApplicationInitiatorResponderMode :: Versions ntnVersion ntnVersionData (OuroborosBundleWithExpandedCtx 'InitiatorResponderMode ntnAddr ByteString m a ())
- daLocalResponderApplication :: Versions ntcVersion ntcVersionData (OuroborosApplicationWithMinimalCtx 'ResponderMode ntcAddr ByteString m Void ())
- daLedgerPeersCtx :: LedgerPeersConsensusInterface m
- daUpdateOutboundConnectionsState :: OutboundConnectionsState -> STM m ()
- data ExtraApplications (p2p :: P2P) ntnAddr (m :: Type -> Type) a where
- P2PApplications :: forall ntnAddr (m :: Type -> Type) a. ApplicationsExtra ntnAddr m a -> ExtraApplications 'P2P ntnAddr m a
- NonP2PApplications :: forall ntnAddr (m :: Type -> Type) a. ApplicationsExtra -> ExtraApplications 'NonP2P ntnAddr m a
- run :: forall (p2p :: P2P) a. Tracers RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO -> ExtraTracers p2p -> Arguments IO Socket RemoteAddress LocalSocket LocalAddress -> ExtraArguments p2p IO -> Applications RemoteAddress NodeToNodeVersion NodeToNodeVersionData LocalAddress NodeToClientVersion NodeToClientVersionData IO a -> ExtraApplications p2p RemoteAddress IO a -> IO ()
- type AbstractTransitionTrace peerAddr = TransitionTrace' peerAddr AbstractState
- data PublicPeerSelectionState peeraddr
- makePublicPeerSelectionStateVar :: (MonadSTM m, Ord peeraddr) => m (StrictTVar m (PublicPeerSelectionState peeraddr))
Common API
data DiffusionTracer ntnAddr ntcAddr Source #
The DiffusionTracer
logs
- diffusion initialisation messages
- terminal errors thrown by diffusion
RunServer (NonEmpty ntnAddr) | |
RunLocalServer ntcAddr | |
UsingSystemdSocket ntcAddr | |
CreateSystemdSocketForSnocketPath ntcAddr | |
CreatedLocalSocket ntcAddr | |
ConfiguringLocalSocket ntcAddr FileDescriptor | |
ListeningLocalSocket ntcAddr FileDescriptor | |
LocalSocketUp ntcAddr FileDescriptor | |
CreatingServerSocket ntnAddr | |
ConfiguringServerSocket ntnAddr | |
ListeningServerSocket ntnAddr | |
ServerSocketUp ntnAddr | |
UnsupportedLocalSystemdSocket ntnAddr | |
UnsupportedReadySocketCase | |
DiffusionErrored SomeException | |
SystemdSocketConfiguration SystemdSocketTracer |
Instances
(Show ntcAddr, Show ntnAddr) => Show (DiffusionTracer ntnAddr ntcAddr) Source # | |
Defined in Ouroboros.Network.Diffusion.Common showsPrec :: Int -> DiffusionTracer ntnAddr ntcAddr -> ShowS # show :: DiffusionTracer ntnAddr ntcAddr -> String # showList :: [DiffusionTracer ntnAddr ntcAddr] -> ShowS # |
data Tracers ntnAddr ntnVersion ntcAddr ntcVersion (m :: Type -> Type) Source #
Common DiffusionTracers interface between P2P and NonP2P
Tracers | |
|
nullTracers :: forall (m :: Type -> Type) ntnAddr ntnVersion ntcAddr ntcVersion. Applicative m => Tracers ntnAddr ntnVersion ntcAddr ntcVersion m Source #
data ExtraTracers (p2p :: P2P) where Source #
Tracers which depend on p2p mode.
UnsupportedReadySocket :: Failure | |
UnexpectedIPv4Address :: forall ntnAddr. (Show ntnAddr, Typeable ntnAddr) => ntnAddr -> Failure | |
UnexpectedIPv6Address :: forall ntnAddr. (Show ntnAddr, Typeable ntnAddr) => ntnAddr -> Failure | |
NoSocket :: Failure | |
DiffusionError :: SomeException -> Failure |
Instances
Exception Failure Source # | |
Defined in Ouroboros.Network.Diffusion.Common toException :: Failure -> SomeException # fromException :: SomeException -> Maybe Failure # displayException :: Failure -> String # backtraceDesired :: Failure -> Bool # | |
Show Failure Source # | |
data Arguments (m :: Type -> Type) ntnFd ntnAddr ntcFd ntcAddr Source #
Common DiffusionArguments interface between P2P and NonP2P
Arguments | |
|
data ExtraArguments (p2p :: P2P) (m :: Type -> Type) where Source #
Diffusion arguments which depend on p2p mode.
P2PArguments :: forall (m :: Type -> Type). ArgumentsExtra m -> ExtraArguments 'P2P m | |
NonP2PArguments :: forall (m :: Type -> Type). ArgumentsExtra -> ExtraArguments 'NonP2P m |
data Applications ntnAddr ntnVersion ntnVersionData ntcAddr ntcVersion ntcVersionData (m :: Type -> Type) a Source #
Versioned mini-protocol bundles run on a negotiated connection.
Applications | |
|
data ExtraApplications (p2p :: P2P) ntnAddr (m :: Type -> Type) a where Source #
Application data which depend on p2p mode.
P2PApplications :: forall ntnAddr (m :: Type -> Type) a. ApplicationsExtra ntnAddr m a -> ExtraApplications 'P2P ntnAddr m a | |
NonP2PApplications :: forall ntnAddr (m :: Type -> Type) a. ApplicationsExtra -> ExtraApplications 'NonP2P ntnAddr m a |
Run data diffusion
run :: forall (p2p :: P2P) a. Tracers RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO -> ExtraTracers p2p -> Arguments IO Socket RemoteAddress LocalSocket LocalAddress -> ExtraArguments p2p IO -> Applications RemoteAddress NodeToNodeVersion NodeToNodeVersionData LocalAddress NodeToClientVersion NodeToClientVersionData IO a -> ExtraApplications p2p RemoteAddress IO a -> IO () Source #
Re-exports
type AbstractTransitionTrace peerAddr = TransitionTrace' peerAddr AbstractState #
data PublicPeerSelectionState peeraddr Source #
Public PeerSelectionState
that can be accessed by Peer Sharing
mechanisms without any problem.
This data type should not expose too much information and keep only essential data needed for computing the peer sharing request result
makePublicPeerSelectionStateVar :: (MonadSTM m, Ord peeraddr) => m (StrictTVar m (PublicPeerSelectionState peeraddr)) Source #