Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cardano.Node.Configuration.Topology
Synopsis
- newtype TopologyError = NodeIdNotFoundInToplogyFile FilePath
- data NetworkTopology
- 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 :: ![RemoteAddress]
- data RemoteAddress = RemoteAddress {
- raAddress :: !Text
- raPort :: !PortNumber
- raValency :: !Int
- nodeAddressToSockAddr :: NodeIPAddress -> SockAddr
- readTopologyFile :: NodeConfiguration -> IO (Either Text NetworkTopology)
- readTopologyFileOrError :: NodeConfiguration -> IO NetworkTopology
- remoteAddressToNodeAddress :: RemoteAddress -> Maybe (Either NodeIPAddress (NodeDnsAddress, Int))
Documentation
newtype TopologyError Source #
Constructors
NodeIdNotFoundInToplogyFile FilePath |
Instances
Show TopologyError Source # | |
Defined in Cardano.Node.Configuration.Topology |
data NetworkTopology Source #
Constructors
MockNodeTopology ![NodeSetup] | |
RealNodeTopology ![RemoteAddress] |
Instances
FromJSON NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.Topology Methods parseJSON :: Value -> Parser NetworkTopology parseJSONList :: Value -> Parser [NetworkTopology] | |
ToJSON NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.Topology Methods toJSON :: NetworkTopology -> Value # toEncoding :: NetworkTopology -> Encoding toJSONList :: [NetworkTopology] -> Value toEncodingList :: [NetworkTopology] -> Encoding omitField :: NetworkTopology -> Bool | |
Show NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.Topology | |
Eq NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.Topology Methods (==) :: NetworkTopology -> NetworkTopology -> Bool Source # (/=) :: NetworkTopology -> NetworkTopology -> 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.Topology | |
ToJSON NodeSetup Source # | |
Defined in Cardano.Node.Configuration.Topology Methods toJSON :: NodeSetup -> Value # toEncoding :: NodeSetup -> Encoding toJSONList :: [NodeSetup] -> Value toEncodingList :: [NodeSetup] -> Encoding | |
Show NodeSetup Source # | |
Eq NodeSetup Source # | |
data RemoteAddress Source #
Domain name with port number
Constructors
RemoteAddress | |
Fields
|
Instances
nodeAddressToSockAddr :: NodeIPAddress -> SockAddr Source #
readTopologyFile :: NodeConfiguration -> IO (Either Text NetworkTopology) Source #
Read the NetworkTopology
configuration from the specified file.
While running a real protocol, this gives your node its own address and
other remote peers it will attempt to connect to.
remoteAddressToNodeAddress :: RemoteAddress -> Maybe (Either NodeIPAddress (NodeDnsAddress, Int)) Source #
Parse raAddress
field as an IP address; if it parses and the valency is
non zero return corresponding NodeAddress.