mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 14:40:17 +00:00
fix
This commit is contained in:
parent
c1fbea1a49
commit
d711bb6ff6
@ -1,12 +1,20 @@
|
|||||||
service Console("run-console"):
|
service Hello:
|
||||||
print(s: string)
|
say_hello()
|
||||||
|
|
||||||
func main():
|
func foo():
|
||||||
ss: *string
|
on HOST_PEER_ID:
|
||||||
dd: *string
|
Hello "hello"
|
||||||
peerId = "peerId"
|
|
||||||
relay = "relay"
|
-- This closure will execute on HOST_PEER_ID
|
||||||
parsec s <- ss on peerId via relay:
|
closure = ():
|
||||||
Console.print(s)
|
Hello.say_hello()
|
||||||
for d <- dd par:
|
|
||||||
Console.print(d)
|
fn = func ():
|
||||||
|
Hello.say_hello()
|
||||||
|
|
||||||
|
-- Will go to HOST_PEER_ID, where Hello service is resolved, and call say_hello
|
||||||
|
closure()
|
||||||
|
|
||||||
|
-- Will be called on current peer, probably INIT_PEER_ID, and may fail
|
||||||
|
-- in case Hello service is not defined or has another ID
|
||||||
|
fn()
|
Loading…
Reference in New Issue
Block a user