nox
nox copied to clipboard
Rework builtin api for services
I think the api should better have the following interface (debatable):
alias ServiceId: string
data ServiceInfo:
id: ServiceId
blueprint_id: string
owner_id: string
interface: Interface
service Srv("srv"):
-- ...
-- Returns a list of services running on a peer
list() -> []ServiceId
-- Retrieves the functional interface of a service running
-- on the node specified in the service call
-- Argument: service_id – ID of the service whose interface you want to retrieve.
get_interface(service_id: string) -> ServiceInfo
Basically, moving all the data into 'details' api and leaving list with only ids