Safe Haskell | None |
---|---|
Language | Haskell2010 |
Public interface of
Subscription
workers.
Synopsis
- ipSubscriptionWorker :: forall a. Snocket IO Socket SockAddr -> Tracer IO ( WithIPList ( SubscriptionTrace SockAddr )) -> Tracer IO ( WithAddr SockAddr ErrorPolicyTrace ) -> NetworkMutableState SockAddr -> IPSubscriptionParams a -> ( Socket -> IO a) -> IO Void
-
data
IPSubscriptionTarget
=
IPSubscriptionTarget
{
- ispIps :: ![ SockAddr ]
- ispValency :: ! Int
- dnsSubscriptionWorker :: Snocket IO Socket SockAddr -> Tracer IO ( WithDomainName ( SubscriptionTrace SockAddr )) -> Tracer IO ( WithDomainName DnsTrace ) -> Tracer IO ( WithAddr SockAddr ErrorPolicyTrace ) -> NetworkMutableState SockAddr -> DnsSubscriptionParams a -> ( Socket -> IO a) -> IO Void
-
data
DnsSubscriptionTarget
=
DnsSubscriptionTarget
{
- dstDomain :: ! Domain
- dstPort :: ! PortNumber
- dstValency :: ! Int
- data ConnectResult
- defaultConnectionAttemptDelay :: DiffTime
- minConnectionAttemptDelay :: DiffTime
- maxConnectionAttemptDelay :: DiffTime
- ipRetryDelay :: DiffTime
- resolutionDelay :: DiffTime
- data SubscriberError = SubscriberError { }
-
data
SubscriptionTrace
addr
- = SubscriptionTraceConnectStart addr
- | SubscriptionTraceConnectEnd addr ConnectResult
- | forall e. Exception e => SubscriptionTraceSocketAllocationException addr e
- | forall e. Exception e => SubscriptionTraceConnectException addr e
- | forall e. Exception e => SubscriptionTraceApplicationException addr e
- | SubscriptionTraceTryConnectToPeer addr
- | SubscriptionTraceSkippingPeer addr
- | SubscriptionTraceSubscriptionRunning
- | SubscriptionTraceSubscriptionWaiting Int
- | SubscriptionTraceSubscriptionFailed
- | SubscriptionTraceSubscriptionWaitingNewConnection DiffTime
- | SubscriptionTraceStart Int
- | SubscriptionTraceRestart DiffTime Int Int
- | SubscriptionTraceConnectionExist addr
- | SubscriptionTraceUnsupportedRemoteAddr addr
- | SubscriptionTraceMissingLocalAddress
- | SubscriptionTraceAllocateSocket addr
- | SubscriptionTraceCloseSocket addr
- data WithIPList a = WithIPList { }
- data DnsTrace
- data WithDomainName a = WithDomainName { }
IP Subscription Worker
ipSubscriptionWorker :: forall a. Snocket IO Socket SockAddr -> Tracer IO ( WithIPList ( SubscriptionTrace SockAddr )) -> Tracer IO ( WithAddr SockAddr ErrorPolicyTrace ) -> NetworkMutableState SockAddr -> IPSubscriptionParams a -> ( Socket -> IO a) -> IO Void Source #
Spawns a subscription worker which will attempt to keep the specified number of connections (Valency) active towards the list of IP addresses given in IPSubscriptionTarget.
data IPSubscriptionTarget Source #
IPSubscriptionTarget | |
|
Instances
Eq IPSubscriptionTarget Source # | |
Defined in Ouroboros.Network.Subscription.Ip (==) :: IPSubscriptionTarget -> IPSubscriptionTarget -> Bool Source # (/=) :: IPSubscriptionTarget -> IPSubscriptionTarget -> Bool Source # |
|
Show IPSubscriptionTarget Source # | |
Defined in Ouroboros.Network.Subscription.Ip |
DNS Subscription Worker
dnsSubscriptionWorker :: Snocket IO Socket SockAddr -> Tracer IO ( WithDomainName ( SubscriptionTrace SockAddr )) -> Tracer IO ( WithDomainName DnsTrace ) -> Tracer IO ( WithAddr SockAddr ErrorPolicyTrace ) -> NetworkMutableState SockAddr -> DnsSubscriptionParams a -> ( Socket -> IO a) -> IO Void Source #
data DnsSubscriptionTarget Source #
DnsSubscriptionTarget | |
|
Instances
Eq DnsSubscriptionTarget Source # | |
Defined in Ouroboros.Network.Subscription.Dns (==) :: DnsSubscriptionTarget -> DnsSubscriptionTarget -> Bool Source # (/=) :: DnsSubscriptionTarget -> DnsSubscriptionTarget -> Bool Source # |
|
Show DnsSubscriptionTarget Source # | |
Defined in Ouroboros.Network.Subscription.Dns |
data ConnectResult Source #
GADT which classifies connection result.
ConnectSuccess |
Successful connection. |
ConnectSuccessLast |
Successfully connection, reached the valency target. Other ongoing connection attempts will be killed. |
ConnectValencyExceeded |
Someone else manged to create the final connection to a target before us. |
Instances
Eq ConnectResult Source # | |
Defined in Ouroboros.Network.Subscription.Worker (==) :: ConnectResult -> ConnectResult -> Bool Source # (/=) :: ConnectResult -> ConnectResult -> Bool Source # |
|
Ord ConnectResult Source # | |
Defined in Ouroboros.Network.Subscription.Worker compare :: ConnectResult -> ConnectResult -> Ordering Source # (<) :: ConnectResult -> ConnectResult -> Bool Source # (<=) :: ConnectResult -> ConnectResult -> Bool Source # (>) :: ConnectResult -> ConnectResult -> Bool Source # (>=) :: ConnectResult -> ConnectResult -> Bool Source # max :: ConnectResult -> ConnectResult -> ConnectResult Source # min :: ConnectResult -> ConnectResult -> ConnectResult Source # |
|
Show ConnectResult Source # | |
Defined in Ouroboros.Network.Subscription.Worker |
Constants
defaultConnectionAttemptDelay :: DiffTime Source #
Time to wait between connection attempts when we don't have any DeltaQ info.
minConnectionAttemptDelay :: DiffTime Source #
Minimum time to wait between connection attempts.
maxConnectionAttemptDelay :: DiffTime Source #
Maximum time to wait between connection attempts.
ipRetryDelay :: DiffTime Source #
Minimum time to wait between ip reconnects
resolutionDelay :: DiffTime Source #
Time to wait for an AAAA response after receiving an A response.
Errors
data SubscriberError Source #
Instances
Tracing
data SubscriptionTrace addr Source #
Instances
Show addr => Show ( SubscriptionTrace addr) Source # | |
Defined in Ouroboros.Network.Subscription.Worker |
data WithIPList a Source #
Instances
Show a => Show ( WithIPList a) Source # | |
Defined in Ouroboros.Network.Subscription.Ip |
data WithDomainName a Source #
Instances
Show a => Show ( WithDomainName a) Source # | |
Defined in Ouroboros.Network.Subscription.Dns |