module Ouroboros.Network.Tracers
( NetworkSubscriptionTracers (..)
, NetworkIPSubscriptionTracers
, nullNetworkSubscriptionTracers
, NetworkDNSSubscriptionTracers (..)
, nullNetworkDNSSubscriptionTracers
) where
import qualified Codec.CBOR.Term as CBOR
import Control.Tracer (Tracer, nullTracer)
import Network.Mux.Trace
import Ouroboros.Network.Driver (TraceSendRecv)
import Ouroboros.Network.ErrorPolicy
import Ouroboros.Network.Protocol.Handshake.Type
import Ouroboros.Network.Socket (ConnectionId)
import Ouroboros.Network.Subscription.Dns
import Ouroboros.Network.Subscription.Ip
data NetworkSubscriptionTracers withIPList addr vNumber = NetworkSubscriptionTracers {
NetworkSubscriptionTracers withIPList addr vNumber
-> Tracer IO (WithMuxBearer (ConnectionId addr) MuxTrace)
nsMuxTracer :: Tracer IO (WithMuxBearer (ConnectionId addr) MuxTrace),
NetworkSubscriptionTracers withIPList addr vNumber
-> Tracer
IO
(WithMuxBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
nsHandshakeTracer :: Tracer IO (WithMuxBearer (ConnectionId addr)
(TraceSendRecv (Handshake vNumber CBOR.Term))),
NetworkSubscriptionTracers withIPList addr vNumber
-> Tracer IO (WithAddr addr ErrorPolicyTrace)
nsErrorPolicyTracer :: Tracer IO (WithAddr addr ErrorPolicyTrace),
NetworkSubscriptionTracers withIPList addr vNumber
-> Tracer IO (withIPList (SubscriptionTrace addr))
nsSubscriptionTracer :: Tracer IO (withIPList (SubscriptionTrace addr))
}
type NetworkIPSubscriptionTracers addr vNumber =
NetworkSubscriptionTracers WithIPList addr vNumber
nullNetworkSubscriptionTracers :: NetworkSubscriptionTracers withIPList addr vNumber
nullNetworkSubscriptionTracers :: NetworkSubscriptionTracers withIPList addr vNumber
nullNetworkSubscriptionTracers = NetworkSubscriptionTracers :: forall (withIPList :: * -> *) addr vNumber.
Tracer IO (WithMuxBearer (ConnectionId addr) MuxTrace)
-> Tracer
IO
(WithMuxBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
-> Tracer IO (WithAddr addr ErrorPolicyTrace)
-> Tracer IO (withIPList (SubscriptionTrace addr))
-> NetworkSubscriptionTracers withIPList addr vNumber
NetworkSubscriptionTracers {
nsMuxTracer :: Tracer IO (WithMuxBearer (ConnectionId addr) MuxTrace)
nsMuxTracer = Tracer IO (WithMuxBearer (ConnectionId addr) MuxTrace)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
nsHandshakeTracer :: Tracer
IO
(WithMuxBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
nsHandshakeTracer = Tracer
IO
(WithMuxBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
nsErrorPolicyTracer :: Tracer IO (WithAddr addr ErrorPolicyTrace)
nsErrorPolicyTracer = Tracer IO (WithAddr addr ErrorPolicyTrace)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
nsSubscriptionTracer :: Tracer IO (withIPList (SubscriptionTrace addr))
nsSubscriptionTracer = Tracer IO (withIPList (SubscriptionTrace addr))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
}
data NetworkDNSSubscriptionTracers vNumber addr = NetworkDNSSubscriptionTracers {
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer IO (WithMuxBearer (ConnectionId addr) MuxTrace)
ndstMuxTracer :: Tracer IO (WithMuxBearer (ConnectionId addr) MuxTrace),
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer
IO
(WithMuxBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
ndstHandshakeTracer :: Tracer IO (WithMuxBearer (ConnectionId addr)
(TraceSendRecv (Handshake vNumber CBOR.Term))),
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer IO (WithAddr addr ErrorPolicyTrace)
ndstErrorPolicyTracer :: Tracer IO (WithAddr addr ErrorPolicyTrace),
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer IO (WithDomainName (SubscriptionTrace addr))
ndstSubscriptionTracer :: Tracer IO (WithDomainName (SubscriptionTrace addr)),
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer IO (WithDomainName DnsTrace)
ndstDnsTracer :: Tracer IO (WithDomainName DnsTrace)
}
nullNetworkDNSSubscriptionTracers :: NetworkDNSSubscriptionTracers vNumber peerid
nullNetworkDNSSubscriptionTracers :: NetworkDNSSubscriptionTracers vNumber peerid
nullNetworkDNSSubscriptionTracers = NetworkDNSSubscriptionTracers :: forall vNumber addr.
Tracer IO (WithMuxBearer (ConnectionId addr) MuxTrace)
-> Tracer
IO
(WithMuxBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
-> Tracer IO (WithAddr addr ErrorPolicyTrace)
-> Tracer IO (WithDomainName (SubscriptionTrace addr))
-> Tracer IO (WithDomainName DnsTrace)
-> NetworkDNSSubscriptionTracers vNumber addr
NetworkDNSSubscriptionTracers {
ndstMuxTracer :: Tracer IO (WithMuxBearer (ConnectionId peerid) MuxTrace)
ndstMuxTracer = Tracer IO (WithMuxBearer (ConnectionId peerid) MuxTrace)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
ndstHandshakeTracer :: Tracer
IO
(WithMuxBearer
(ConnectionId peerid) (TraceSendRecv (Handshake vNumber Term)))
ndstHandshakeTracer = Tracer
IO
(WithMuxBearer
(ConnectionId peerid) (TraceSendRecv (Handshake vNumber Term)))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
ndstErrorPolicyTracer :: Tracer IO (WithAddr peerid ErrorPolicyTrace)
ndstErrorPolicyTracer = Tracer IO (WithAddr peerid ErrorPolicyTrace)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
ndstSubscriptionTracer :: Tracer IO (WithDomainName (SubscriptionTrace peerid))
ndstSubscriptionTracer = Tracer IO (WithDomainName (SubscriptionTrace peerid))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
ndstDnsTracer :: Tracer IO (WithDomainName DnsTrace)
ndstDnsTracer = Tracer IO (WithDomainName DnsTrace)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
}