ouroboros-network-api
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.PeerSelection.RelayAccessPoint

Synopsis

Documentation

data DomainAccessPoint Source #

A product of a Domain and PortNumber. After resolving the domain we will use the PortNumber to form SockAddr.

Instances

Instances details
FromJSON DomainAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToJSON DomainAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Show DomainAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Eq DomainAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Ord DomainAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

data RelayAccessPoint Source #

A relay can have either an IP address and a port number or a domain with a port number

Bundled Patterns

pattern RelayDomainAccessPoint :: DomainAccessPoint -> RelayAccessPoint

RelayDomainAccessPoint a bidirectional pattern which links RelayAccessDomain and DomainAccessPoint.

Instances

Instances details
FromJSON RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToJSON RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

NFData RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Methods

rnf :: RelayAccessPoint -> () #

Show RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Eq RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Ord RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

newtype RelayAccessPointCoded Source #

Instances

Instances details
FromJSON RelayAccessPointCoded Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

ToJSON RelayAccessPointCoded Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

FromCBOR RelayAccessPointCoded Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToCBOR RelayAccessPointCoded Source #

These instances are used to serialize LedgerPeerSnapshot consensus LocalStateQuery server which uses these instances for all its query responses. It appears they provide some improved debugging diagnostics over Serialize instances.

Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

data IP #

A unified IP data for IPv4 and IPv6. To create this, use the data constructors. Or use read "192.0.2.1" :: IP, for example. Also, "192.0.2.1" can be used as literal with OverloadedStrings.

>>> (read "192.0.2.1" :: IP) == IPv4 (read "192.0.2.1" :: IPv4)
True
>>> (read "2001:db8:00:00:00:00:00:01" :: IP) == IPv6 (read "2001:db8:00:00:00:00:00:01" :: IPv6)
True

Constructors

IPv4 

Fields

IPv6 

Fields

Instances

Instances details
Data IP 
Instance details

Defined in Data.IP.Addr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IP -> c IP #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IP #

toConstr :: IP -> Constr #

dataTypeOf :: IP -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IP) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IP) #

gmapT :: (forall b. Data b => b -> b) -> IP -> IP #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IP -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IP -> r #

gmapQ :: (forall d. Data d => d -> u) -> IP -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IP -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IP -> m IP #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IP -> m IP #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IP -> m IP #

IsString IP 
Instance details

Defined in Data.IP.Addr

Methods

fromString :: String -> IP #

Enum IP 
Instance details

Defined in Data.IP.Addr

Methods

succ :: IP -> IP #

pred :: IP -> IP #

toEnum :: Int -> IP #

fromEnum :: IP -> Int #

enumFrom :: IP -> [IP] #

enumFromThen :: IP -> IP -> [IP] #

enumFromTo :: IP -> IP -> [IP] #

enumFromThenTo :: IP -> IP -> IP -> [IP] #

Generic IP 
Instance details

Defined in Data.IP.Addr

Associated Types

type Rep IP 
Instance details

Defined in Data.IP.Addr

type Rep IP = D1 ('MetaData "IP" "Data.IP.Addr" "iproute-1.7.15-92c10579ccaa68750f03c4296bb8091921b68020640da951e29e254441683859" 'False) (C1 ('MetaCons "IPv4" 'PrefixI 'True) (S1 ('MetaSel ('Just "ipv4") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 IPv4)) :+: C1 ('MetaCons "IPv6" 'PrefixI 'True) (S1 ('MetaSel ('Just "ipv6") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 IPv6)))

Methods

from :: IP -> Rep IP x #

to :: Rep IP x -> IP #

Read IP 
Instance details

Defined in Data.IP.Addr

Show IP 
Instance details

Defined in Data.IP.Addr

Methods

showsPrec :: Int -> IP -> ShowS #

show :: IP -> String #

showList :: [IP] -> ShowS #

Eq IP

Equality over IP addresses. Correctly compare IPv4 and IPv4-embedded-in-IPv6 addresses.

>>> (read "2001:db8:00:00:00:00:00:01" :: IP) == (read "2001:db8:00:00:00:00:00:01" :: IP)
True
>>> (read "2001:db8:00:00:00:00:00:01" :: IP) == (read "2001:db8:00:00:00:00:00:05" :: IP)
False
>>> (read "127.0.0.1" :: IP) == (read "127.0.0.1" :: IP)
True
>>> (read "127.0.0.1" :: IP) == (read "10.0.0.1" :: IP)
False
>>> (read "::ffff:127.0.0.1" :: IP) == (read "127.0.0.1" :: IP)
True
>>> (read "::ffff:127.0.0.1" :: IP) == (read "127.0.0.9" :: IP)
False
>>> (read "::ffff:127.0.0.1" :: IP) >= (read "127.0.0.1" :: IP)
True
>>> (read "::ffff:127.0.0.1" :: IP) <= (read "127.0.0.1" :: IP)
True
Instance details

Defined in Data.IP.Addr

Methods

(==) :: IP -> IP -> Bool #

(/=) :: IP -> IP -> Bool #

Ord IP 
Instance details

Defined in Data.IP.Addr

Methods

compare :: IP -> IP -> Ordering #

(<) :: IP -> IP -> Bool #

(<=) :: IP -> IP -> Bool #

(>) :: IP -> IP -> Bool #

(>=) :: IP -> IP -> Bool #

max :: IP -> IP -> IP #

min :: IP -> IP -> IP #

type Rep IP 
Instance details

Defined in Data.IP.Addr

type Rep IP = D1 ('MetaData "IP" "Data.IP.Addr" "iproute-1.7.15-92c10579ccaa68750f03c4296bb8091921b68020640da951e29e254441683859" 'False) (C1 ('MetaCons "IPv4" 'PrefixI 'True) (S1 ('MetaSel ('Just "ipv4") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 IPv4)) :+: C1 ('MetaCons "IPv6" 'PrefixI 'True) (S1 ('MetaSel ('Just "ipv6") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 IPv6)))

Socket type re-exports

data PortNumber #

Port number. Use the Num instance (i.e. use a literal) to create a PortNumber value.

>>> 1 :: PortNumber
1
>>> read "1" :: PortNumber
1
>>> show (12345 :: PortNumber)
"12345"
>>> 50000 < (51000 :: PortNumber)
True
>>> 50000 < (52000 :: PortNumber)
True
>>> 50000 + (10000 :: PortNumber)
60000

Instances

Instances details
Bounded PortNumber 
Instance details

Defined in Network.Socket.Types

Enum PortNumber 
Instance details

Defined in Network.Socket.Types

Storable PortNumber 
Instance details

Defined in Network.Socket.Types

Num PortNumber 
Instance details

Defined in Network.Socket.Types

Read PortNumber 
Instance details

Defined in Network.Socket.Types

Integral PortNumber 
Instance details

Defined in Network.Socket.Types

Real PortNumber 
Instance details

Defined in Network.Socket.Types

Show PortNumber 
Instance details

Defined in Network.Socket.Types

Eq PortNumber 
Instance details

Defined in Network.Socket.Types

Ord PortNumber 
Instance details

Defined in Network.Socket.Types