ouroboros-network-framework-0.13.1.0: Ouroboros network framework
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Network.Context

Contents

Description

Initiator and responder execution context.

Synopsis

Documentation

data ExpandedInitiatorContext addr m Source #

Context passed to initiator mini-protocol execution.

newtype MinimalInitiatorContext addr Source #

A context passed to initiator mini-protocol execution for non-p2p applications.

Instances

Instances details
Functor MinimalInitiatorContext Source # 
Instance details

Defined in Ouroboros.Network.Context

newtype ResponderContext addr Source #

Context passed to each responder mini-protocol execution.

Constructors

ResponderContext 

Fields

Instances

Instances details
Functor ResponderContext Source # 
Instance details

Defined in Ouroboros.Network.Context

Methods

fmap ∷ (a → b) → ResponderContext a → ResponderContext b #

(<$) ∷ a → ResponderContext b → ResponderContext a #

Re-exports

data ConnectionId addr Source #

Connection is identified by local and remote address.

TODO: the type variable which this data type fills in is called peerid. We should renamed to connectionId.

Constructors

ConnectionId 

Fields

Instances

Instances details
Functor ConnectionId Source # 
Instance details

Defined in Ouroboros.Network.ConnectionId

Methods

fmap ∷ (a → b) → ConnectionId a → ConnectionId b #

(<$) ∷ a → ConnectionId b → ConnectionId a #

ShowProxy addr ⇒ ShowProxy (ConnectionId addr ∷ Type) Source # 
Instance details

Defined in Ouroboros.Network.ConnectionId

Methods

showProxyProxy (ConnectionId addr) → String Source #

Generic (ConnectionId addr) Source # 
Instance details

Defined in Ouroboros.Network.ConnectionId

Associated Types

type Rep (ConnectionId addr) ∷ TypeType #

Methods

fromConnectionId addr → Rep (ConnectionId addr) x #

toRep (ConnectionId addr) x → ConnectionId addr #

Show addr ⇒ Show (ConnectionId addr) Source # 
Instance details

Defined in Ouroboros.Network.ConnectionId

Methods

showsPrecIntConnectionId addr → ShowS #

showConnectionId addr → String #

showList ∷ [ConnectionId addr] → ShowS #

Eq addr ⇒ Eq (ConnectionId addr) Source # 
Instance details

Defined in Ouroboros.Network.ConnectionId

Methods

(==)ConnectionId addr → ConnectionId addr → Bool #

(/=)ConnectionId addr → ConnectionId addr → Bool #

Ord addr ⇒ Ord (ConnectionId addr) Source #

Order first by remoteAddress then by localAddress.

Note: we relay on the fact that remoteAddress is an order preserving map (which allows us to use mapKeysMonotonic in some cases).

Instance details

Defined in Ouroboros.Network.ConnectionId

Methods

compareConnectionId addr → ConnectionId addr → Ordering #

(<)ConnectionId addr → ConnectionId addr → Bool #

(<=)ConnectionId addr → ConnectionId addr → Bool #

(>)ConnectionId addr → ConnectionId addr → Bool #

(>=)ConnectionId addr → ConnectionId addr → Bool #

maxConnectionId addr → ConnectionId addr → ConnectionId addr #

minConnectionId addr → ConnectionId addr → ConnectionId addr #

Hashable a ⇒ Hashable (ConnectionId a) Source # 
Instance details

Defined in Ouroboros.Network.ConnectionId

Typeable addr ⇒ NoThunks (ConnectionId addr) Source # 
Instance details

Defined in Ouroboros.Network.ConnectionId

type Rep (ConnectionId addr) Source # 
Instance details

Defined in Ouroboros.Network.ConnectionId

type Rep (ConnectionId addr) = D1 ('MetaData "ConnectionId" "Ouroboros.Network.ConnectionId" "ouroboros-network-framework-0.13.1.0-inplace" 'False) (C1 ('MetaCons "ConnectionId" 'PrefixI 'True) (S1 ('MetaSel ('Just "localAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 addr) :*: S1 ('MetaSel ('Just "remoteAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 addr)))

type ControlMessageSTM (m ∷ TypeType) = STM m ControlMessage Source #

ControlMessageSTM should depend on muxMode (we only need to schedule stop for initiator side). This is not done only because this would break tests, but once the old api is removed it should be possible.

data IsBigLedgerPeer Source #

A boolean like type. Big ledger peers are the largest SPOs which control 90% of staked stake.

Note that IsBigLedgerPeer indicates a role that peer plays in the eclipse evasion, e.g. that a peer was explicitly selected as a big ledger peer, e.g. IsNotBigLedgerPeer does not necessarily mean that the peer isn't a big ledger peer. This is because we select root peers from all ledger peers (including big ones).

Instances

Instances details
Eq IsBigLedgerPeer 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type