2022-06-28 17:05:29 -05:00

25 lines
669 B
Plaintext

data FunctionAddress:
peer_id: string
service_id: string
func get_service_id_no_try(node: string, services: []FunctionAddress) -> string:
res: *string
for service <- services:
if service.peer_id == node:
res <<- service.service_id
<- res[0]
func get_service_id_try(node: string, services: []FunctionAddress) -> string:
res: *string
for service <- services try:
if service.peer_id == node:
res <<- service.service_id
<- res[0]
func get_service_id_par(node: string, services: []FunctionAddress) -> string:
res: *string
for service <- services par:
if service.peer_id == node:
res <<- service.service_id
<- res[0]