module Ouroboros.Network.Tracers
( NetworkSubscriptionTracers (..)
, NetworkIPSubscriptionTracers
, nullNetworkSubscriptionTracers
, NetworkDNSSubscriptionTracers (..)
, nullNetworkDNSSubscriptionTracers
) where
import Codec.CBOR.Term qualified as CBOR
import Control.Tracer (Tracer, nullTracer)
import Network.Mux.Trace qualified as Mx
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 {
forall (withIPList :: * -> *) addr vNumber.
NetworkSubscriptionTracers withIPList addr vNumber
-> Tracer IO (WithBearer (ConnectionId addr) Trace)
nsMuxTracer :: Tracer IO (Mx.WithBearer (ConnectionId addr) Mx.Trace),
forall (withIPList :: * -> *) addr vNumber.
NetworkSubscriptionTracers withIPList addr vNumber
-> Tracer
IO
(WithBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
nsHandshakeTracer :: Tracer IO (Mx.WithBearer (ConnectionId addr)
(TraceSendRecv (Handshake vNumber CBOR.Term))),
forall (withIPList :: * -> *) addr vNumber.
NetworkSubscriptionTracers withIPList addr vNumber
-> Tracer IO (WithAddr addr ErrorPolicyTrace)
nsErrorPolicyTracer :: Tracer IO (WithAddr addr ErrorPolicyTrace),
forall (withIPList :: * -> *) addr vNumber.
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 :: forall (withIPList :: * -> *) addr vNumber.
NetworkSubscriptionTracers withIPList addr vNumber
nullNetworkSubscriptionTracers = NetworkSubscriptionTracers {
nsMuxTracer :: Tracer IO (WithBearer (ConnectionId addr) Trace)
nsMuxTracer = Tracer IO (WithBearer (ConnectionId addr) Trace)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
nsHandshakeTracer :: Tracer
IO
(WithBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
nsHandshakeTracer = Tracer
IO
(WithBearer
(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 {
forall vNumber addr.
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer IO (WithBearer (ConnectionId addr) Trace)
ndstMuxTracer :: Tracer IO (Mx.WithBearer (ConnectionId addr) Mx.Trace),
forall vNumber addr.
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer
IO
(WithBearer
(ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
ndstHandshakeTracer :: Tracer IO (Mx.WithBearer (ConnectionId addr)
(TraceSendRecv (Handshake vNumber CBOR.Term))),
forall vNumber addr.
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer IO (WithAddr addr ErrorPolicyTrace)
ndstErrorPolicyTracer :: Tracer IO (WithAddr addr ErrorPolicyTrace),
forall vNumber addr.
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer IO (WithDomainName (SubscriptionTrace addr))
ndstSubscriptionTracer :: Tracer IO (WithDomainName (SubscriptionTrace addr)),
forall vNumber addr.
NetworkDNSSubscriptionTracers vNumber addr
-> Tracer IO (WithDomainName DnsTrace)
ndstDnsTracer :: Tracer IO (WithDomainName DnsTrace)
}
nullNetworkDNSSubscriptionTracers :: NetworkDNSSubscriptionTracers vNumber peerid
nullNetworkDNSSubscriptionTracers :: forall vNumber peerid. NetworkDNSSubscriptionTracers vNumber peerid
nullNetworkDNSSubscriptionTracers = NetworkDNSSubscriptionTracers {
ndstMuxTracer :: Tracer IO (WithBearer (ConnectionId peerid) Trace)
ndstMuxTracer = Tracer IO (WithBearer (ConnectionId peerid) Trace)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer,
ndstHandshakeTracer :: Tracer
IO
(WithBearer
(ConnectionId peerid) (TraceSendRecv (Handshake vNumber Term)))
ndstHandshakeTracer = Tracer
IO
(WithBearer
(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
}