Network
peer-ip-address
- Signature
- Example
| peer-ip-address("namespace/runnable-path", String)
peer-ip-address("hello/world") => "1.2.3.4"
Returns external IP of the node that the runnable is running on.
get-hostname
, get-container-ip
- Signature
- Example
| get-hostname(runnable-path String, container-name String) | (container-hostname String)
get-hostname("foo/bar","baz") => "foo-bar_baz"
Finds a container by its runnable-path
and name container-name
and returns its
hostname container-hostname
on the overlay DNS or the bridge network as a fallback.
ip-address-public
- Signature
- Example
| ip-address-public | (ip String)
ip-address-public => "1.2.3.4"
Returns current public ip
of the node it was executed on.
The address is obtained by calling http://ipecho.net/plain
.