Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cardano.Node.Configuration.TopologyP2P
Synopsis
- newtype TopologyError = NodeIdNotFoundInToplogyFile FilePath
- data NetworkTopology = RealNodeTopology !LocalRootPeersGroups ![PublicRootPeers] !UseLedger
- newtype PublicRootPeers = PublicRootPeers {}
- data LocalRootPeersGroup = LocalRootPeersGroup {
- localRoots :: RootConfig
- hotValency :: HotValency
- warmValency :: WarmValency
- newtype LocalRootPeersGroups = LocalRootPeersGroups {}
- data RootConfig = RootConfig {
- rootAccessPoints :: [RelayAccessPoint]
- rootAdvertise :: PeerAdvertise
- newtype NodeHostIPAddress = NodeHostIPAddress {
- unNodeHostIPAddress :: IP
- newtype NodeHostIPv4Address = NodeHostIPv4Address {
- unNodeHostIPv4Address :: IPv4
- newtype NodeHostIPv6Address = NodeHostIPv6Address {
- unNodeHostIPv6Address :: IPv6
- data NodeSetup = NodeSetup {
- nodeId :: !Word64
- nodeIPv4Address :: !(Maybe NodeIPv4Address)
- nodeIPv6Address :: !(Maybe NodeIPv6Address)
- producers :: ![RootConfig]
- useLedger :: !UseLedger
- data PeerAdvertise
- nodeAddressToSockAddr :: NodeIPAddress -> SockAddr
- readTopologyFile :: Tracer IO (StartupTrace blk) -> NodeConfiguration -> IO (Either Text NetworkTopology)
- readTopologyFileOrError :: Tracer IO (StartupTrace blk) -> NodeConfiguration -> IO NetworkTopology
- rootConfigToRelayAccessPoint :: RootConfig -> [(RelayAccessPoint, PeerAdvertise)]
Documentation
newtype TopologyError Source #
Constructors
NodeIdNotFoundInToplogyFile FilePath |
Instances
Show TopologyError Source # | |
Defined in Cardano.Node.Configuration.Topology |
data NetworkTopology Source #
Constructors
RealNodeTopology !LocalRootPeersGroups ![PublicRootPeers] !UseLedger |
Instances
FromJSON NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods parseJSON :: Value -> Parser NetworkTopology parseJSONList :: Value -> Parser [NetworkTopology] | |
ToJSON NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods toJSON :: NetworkTopology -> Value # toEncoding :: NetworkTopology -> Encoding toJSONList :: [NetworkTopology] -> Value toEncodingList :: [NetworkTopology] -> Encoding omitField :: NetworkTopology -> Bool | |
Show NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P | |
Eq NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods (==) :: NetworkTopology -> NetworkTopology -> Bool Source # (/=) :: NetworkTopology -> NetworkTopology -> Bool Source # |
newtype PublicRootPeers Source #
Constructors
PublicRootPeers | |
Fields |
Instances
FromJSON PublicRootPeers Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods parseJSON :: Value -> Parser PublicRootPeers parseJSONList :: Value -> Parser [PublicRootPeers] | |
ToJSON PublicRootPeers Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods toJSON :: PublicRootPeers -> Value # toEncoding :: PublicRootPeers -> Encoding toJSONList :: [PublicRootPeers] -> Value toEncodingList :: [PublicRootPeers] -> Encoding omitField :: PublicRootPeers -> Bool | |
Show PublicRootPeers Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P | |
Eq PublicRootPeers Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods (==) :: PublicRootPeers -> PublicRootPeers -> Bool Source # (/=) :: PublicRootPeers -> PublicRootPeers -> Bool Source # |
data LocalRootPeersGroup Source #
A local root peers group. Local roots are treated by the outbound
governor in a special way. The node will make sure that a node has the
requested number (valency
/hotValency
) of connections to the local root peer group.
warmValency
value is the value of warm/established connections that the node
will attempt to maintain. By default this value will be equal to hotValency
.
Constructors
LocalRootPeersGroup | |
Fields
|
Instances
FromJSON LocalRootPeersGroup Source # | Does not use the |
Defined in Cardano.Node.Configuration.TopologyP2P Methods parseJSON :: Value -> Parser LocalRootPeersGroup parseJSONList :: Value -> Parser [LocalRootPeersGroup] | |
ToJSON LocalRootPeersGroup Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods toJSON :: LocalRootPeersGroup -> Value # toEncoding :: LocalRootPeersGroup -> Encoding toJSONList :: [LocalRootPeersGroup] -> Value toEncodingList :: [LocalRootPeersGroup] -> Encoding omitField :: LocalRootPeersGroup -> Bool | |
Show LocalRootPeersGroup Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P | |
Eq LocalRootPeersGroup Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods (==) :: LocalRootPeersGroup -> LocalRootPeersGroup -> Bool Source # (/=) :: LocalRootPeersGroup -> LocalRootPeersGroup -> Bool Source # |
newtype LocalRootPeersGroups Source #
Constructors
LocalRootPeersGroups | |
Fields |
Instances
FromJSON LocalRootPeersGroups Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods parseJSON :: Value -> Parser LocalRootPeersGroups parseJSONList :: Value -> Parser [LocalRootPeersGroups] | |
ToJSON LocalRootPeersGroups Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods toJSON :: LocalRootPeersGroups -> Value # toEncoding :: LocalRootPeersGroups -> Encoding toJSONList :: [LocalRootPeersGroups] -> Value toEncodingList :: [LocalRootPeersGroups] -> Encoding | |
Show LocalRootPeersGroups Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P | |
Eq LocalRootPeersGroups Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods (==) :: LocalRootPeersGroups -> LocalRootPeersGroups -> Bool Source # (/=) :: LocalRootPeersGroups -> LocalRootPeersGroups -> Bool Source # |
data RootConfig Source #
Each root peer consists of a list of access points and a shared
PeerAdvertise
field.
Constructors
RootConfig | |
Fields
|
Instances
FromJSON RootConfig Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P | |
ToJSON RootConfig Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods toJSON :: RootConfig -> Value # toEncoding :: RootConfig -> Encoding toJSONList :: [RootConfig] -> Value toEncodingList :: [RootConfig] -> Encoding omitField :: RootConfig -> Bool | |
Show RootConfig Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P | |
Eq RootConfig Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods (==) :: RootConfig -> RootConfig -> Bool Source # (/=) :: RootConfig -> RootConfig -> Bool Source # |
newtype NodeHostIPAddress Source #
Constructors
NodeHostIPAddress | |
Fields
|
Instances
newtype NodeHostIPv4Address Source #
Constructors
NodeHostIPv4Address | |
Fields
|
Instances
newtype NodeHostIPv6Address Source #
Constructors
NodeHostIPv6Address | |
Fields
|
Instances
Constructors
NodeSetup | |
Fields
|
Instances
FromJSON NodeSetup Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P | |
ToJSON NodeSetup Source # | |
Defined in Cardano.Node.Configuration.TopologyP2P Methods toJSON :: NodeSetup -> Value # toEncoding :: NodeSetup -> Encoding toJSONList :: [NodeSetup] -> Value toEncodingList :: [NodeSetup] -> Encoding | |
Show NodeSetup Source # | |
Eq NodeSetup Source # | |
data PeerAdvertise #
Constructors
DoNotAdvertisePeer | |
DoAdvertisePeer |
Instances
nodeAddressToSockAddr :: NodeIPAddress -> SockAddr Source #
readTopologyFile :: Tracer IO (StartupTrace blk) -> NodeConfiguration -> IO (Either Text NetworkTopology) Source #
Read the NetworkTopology
configuration from the specified file.
readTopologyFileOrError :: Tracer IO (StartupTrace blk) -> NodeConfiguration -> IO NetworkTopology Source #
rootConfigToRelayAccessPoint :: RootConfig -> [(RelayAccessPoint, PeerAdvertise)] Source #
Transforms a RootConfig
into a pair of RelayAccessPoint
and its
corresponding PeerAdvertise
value.