ouroboros-network-framework-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Subscription

Description

Public interface of Subscription workers.

Synopsis

IP Subscription Worker

ipSubscriptionWorker ∷ ∀ 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 #

Constructors

IPSubscriptionTarget 

Fields

  • ispIps ∷ ![SockAddr]

    List of destinations to possibly connect to

  • ispValency ∷ !Int

    Number of parallel connections to keep actice.

DNS Subscription Worker

dnsSubscriptionWorkerSnocket 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 ConnectResult Source #

GADT which classifies connection result.

Constructors

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.

Constants

defaultConnectionAttemptDelayDiffTime Source #

Time to wait between connection attempts when we don't have any DeltaQ info.

minConnectionAttemptDelayDiffTime Source #

Minimum time to wait between connection attempts.

maxConnectionAttemptDelayDiffTime Source #

Maximum time to wait between connection attempts.

ipRetryDelayDiffTime Source #

Minimum time to wait between ip reconnects

resolutionDelayDiffTime Source #

Time to wait for an AAAA response after receiving an A response.

Errors

Tracing

data WithIPList a Source #

Constructors

WithIPList 

Fields

Instances

Instances details
Show a ⇒ Show (WithIPList a) Source # 
Instance details

Defined in Ouroboros.Network.Subscription.Ip

data WithDomainName a Source #

Constructors

WithDomainName 

Fields

Instances

Instances details
Show a ⇒ Show (WithDomainName a) Source # 
Instance details

Defined in Ouroboros.Network.Subscription.Dns