mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 14:40:17 +00:00
20 lines
449 B
Plaintext
20 lines
449 B
Plaintext
service Hello:
|
|
say_hello()
|
|
|
|
func foo():
|
|
on HOST_PEER_ID:
|
|
Hello "hello"
|
|
|
|
-- This closure will execute on HOST_PEER_ID
|
|
closure = ():
|
|
Hello.say_hello()
|
|
|
|
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() |