{-# LANGUAGE DeriveFunctor #-}
module Ouroboros.Network.Context
( ExpandedInitiatorContext (..)
, MinimalInitiatorContext (..)
, ResponderContext (..)
, ConnectionId (..)
, ControlMessageSTM
, IsBigLedgerPeer (..)
) where
import Ouroboros.Network.ConnectionId
import Ouroboros.Network.ControlMessage
import Ouroboros.Network.PeerSelection.LedgerPeers.Type
data ExpandedInitiatorContext addr m = ExpandedInitiatorContext {
forall addr (m :: * -> *).
ExpandedInitiatorContext addr m -> ConnectionId addr
eicConnectionId :: !(ConnectionId addr),
forall addr (m :: * -> *).
ExpandedInitiatorContext addr m -> ControlMessageSTM m
eicControlMessage :: !(ControlMessageSTM m),
forall addr (m :: * -> *).
ExpandedInitiatorContext addr m -> IsBigLedgerPeer
eicIsBigLedgerPeer :: !IsBigLedgerPeer
}
newtype MinimalInitiatorContext addr = MinimalInitiatorContext {
forall addr. MinimalInitiatorContext addr -> ConnectionId addr
micConnectionId :: ConnectionId addr
}
deriving (forall a b.
(a -> b) -> MinimalInitiatorContext a -> MinimalInitiatorContext b)
-> (forall a b.
a -> MinimalInitiatorContext b -> MinimalInitiatorContext a)
-> Functor MinimalInitiatorContext
forall a b.
a -> MinimalInitiatorContext b -> MinimalInitiatorContext a
forall a b.
(a -> b) -> MinimalInitiatorContext a -> MinimalInitiatorContext b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b.
(a -> b) -> MinimalInitiatorContext a -> MinimalInitiatorContext b
fmap :: forall a b.
(a -> b) -> MinimalInitiatorContext a -> MinimalInitiatorContext b
$c<$ :: forall a b.
a -> MinimalInitiatorContext b -> MinimalInitiatorContext a
<$ :: forall a b.
a -> MinimalInitiatorContext b -> MinimalInitiatorContext a
Functor
newtype ResponderContext addr = ResponderContext {
forall addr. ResponderContext addr -> ConnectionId addr
rcConnectionId :: ConnectionId addr
}
deriving (forall a b. (a -> b) -> ResponderContext a -> ResponderContext b)
-> (forall a b. a -> ResponderContext b -> ResponderContext a)
-> Functor ResponderContext
forall a b. a -> ResponderContext b -> ResponderContext a
forall a b. (a -> b) -> ResponderContext a -> ResponderContext b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> ResponderContext a -> ResponderContext b
fmap :: forall a b. (a -> b) -> ResponderContext a -> ResponderContext b
$c<$ :: forall a b. a -> ResponderContext b -> ResponderContext a
<$ :: forall a b. a -> ResponderContext b -> ResponderContext a
Functor