ouroboros-network-framework
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Subscription

Description

Public interface of Subscription workers.

Synopsis

IP Subscription Worker

ipSubscriptionWorker :: 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

DNS Subscription Worker

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

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

Tracing

data WithIPList a Source #

Constructors

WithIPList 

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