| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Node.Configuration.Topology
Synopsis
- newtype TopologyError = NodeIdNotFoundInToplogyFile FilePath
- data NetworkTopology
- newtype NodeHostIPAddress = NodeHostIPAddress {}
- newtype NodeHostIPv4Address = NodeHostIPv4Address {}
- newtype NodeHostIPv6Address = NodeHostIPv6Address {}
- data NodeSetup = NodeSetup {
- nodeId :: !Word64
- nodeIPv4Address :: !(Maybe NodeIPv4Address)
- nodeIPv6Address :: !(Maybe NodeIPv6Address)
- producers :: ![RemoteAddress]
- data RemoteAddress = RemoteAddress {}
- nodeAddressToSockAddr :: NodeIPAddress -> SockAddr
- readTopologyFile :: NodeConfiguration -> IO (Either Text 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 Methods showsPrec :: Int -> TopologyError -> ShowS # show :: TopologyError -> String # showList :: [TopologyError] -> ShowS # | |
data NetworkTopology Source #
Constructors
| MockNodeTopology ![NodeSetup] | |
| RealNodeTopology ![RemoteAddress] |
Instances
| Eq NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.Topology Methods (==) :: NetworkTopology -> NetworkTopology -> Bool # (/=) :: NetworkTopology -> NetworkTopology -> Bool # | |
| Show NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.Topology Methods showsPrec :: Int -> NetworkTopology -> ShowS # show :: NetworkTopology -> String # showList :: [NetworkTopology] -> ShowS # | |
| ToJSON NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.Topology Methods toJSON :: NetworkTopology -> Value Source # toEncoding :: NetworkTopology -> Encoding Source # toJSONList :: [NetworkTopology] -> Value Source # toEncodingList :: [NetworkTopology] -> Encoding Source # | |
| FromJSON NetworkTopology Source # | |
Defined in Cardano.Node.Configuration.Topology Methods parseJSON :: Value -> Parser NetworkTopology Source # parseJSONList :: Value -> Parser [NetworkTopology] 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
| |
data RemoteAddress Source #
Domain name with port number
Constructors
| RemoteAddress | |
Fields
| |
Instances
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.