diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-07-30 18:20:03 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-07-30 18:20:03 +0200 |
commit | 28a0bc8c32d5e68f1a2ede45e8407a5f2f3acc64 (patch) | |
tree | 2b012ac5878e93427a90c3955ac5eaaadd462914 | |
parent | 97597b95b5323565c685594f93182ef99aa633e4 (diff) |
Add network member to the node object
Changelog: Add network member to the node object
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | src/Network.hs | 1 |
2 files changed, 10 insertions, 3 deletions
@@ -173,11 +173,16 @@ Represents network/subnet, created by `subnet` command and used by `subnet`, `no #### node -Represents network node, created by `node` command and used by `spawn` or network configuration commands. +Represents network node, created by `node` command or implicitly by `spawn`, +and used by `spawn` or network configuration commands. Members: -`ip`: string representation of node's IP address. +`ip` +: String representation of node's IP address. + +`network` +: The network which the node belogs to. #### process @@ -185,7 +190,8 @@ Represents running process. Created by `spawn`, used by `send` and `expect` comm Members: -`node`: node on which the process is running +`node` +: Node on which the process is running. #### list diff --git a/src/Network.hs b/src/Network.hs index d892404..7f0896c 100644 --- a/src/Network.hs +++ b/src/Network.hs @@ -110,6 +110,7 @@ instance ExprType Node where recordMembers = map (first T.pack) [ ("ip", RecordSelector $ textIpAddress . nodeIp) + , ("network", RecordSelector $ nodeNetwork) ] |