cardano-testnet-8.8.0: The cardano full node
Safe HaskellSafe-Inferred
LanguageHaskell2010

Testnet.Ping

Synopsis

Documentation

pingNode Source #

Arguments

:: MonadIO m 
=> TestnetMagic

testnet magic

-> Sprocket

node sprocket

-> m (Either PingClientError ())

() means success

Ping the node once

checkSprocket :: MonadIO m => Sprocket -> m (Either IOException ()) Source #

Check if the sprocket can be connected to. Returns an exception thrown during the connection attempt.

waitForSprocket Source #

Arguments

:: MonadIO m 
=> DiffTime

timeout

-> DiffTime

interval

-> Sprocket 
-> m (Either IOException ()) 

Wait for sprocket to become ready. Periodically tries to connect to sprocket, with the provided interval. If there was no success within timeout period, return the last exception thrown during a connection attempt.

data PingClientError Source #

Constructors

PceDecodingError 

Fields

PceProtocolError 

Fields

PceVersionNegotiationError 

Fields

Instances

Instances details
Error PingClientError Source # 
Instance details

Defined in Testnet.Ping

Methods

prettyError :: PingClientError -> Doc ann #