mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 14:40:17 +00:00
19 lines
471 B
Plaintext
19 lines
471 B
Plaintext
service HelloWorld("hello-srv"):
|
|
hello: string -> string
|
|
|
|
data Info:
|
|
external: []string
|
|
|
|
func sayHello(info: Info) -> string:
|
|
-- execute computation on a Peer in the network
|
|
on "hello-peer":
|
|
comp <- HelloWorld.hello(info.external!)
|
|
|
|
-- send the result to target browser in the background
|
|
co on "target-peer" via "target-relay":
|
|
res <- HelloWorld.hello(%init_peer_id%)
|
|
|
|
join comp
|
|
|
|
-- send the result to the initiator
|
|
<- comp |