interfaces is an array of configurations of the channels (e.g. http or websockets) that the Conductor will use to send information to and from instances and users. Interfaces are user facing and make Zome functions, info, and optionally admin functions available to GUIs, browser based web UIs, local native UIs, and other local applications and scripts.
The following implementations are already developed:
The instances (referenced by ID) that are to be made available via that interface should be listed. An admin flag can enable special Conductor functions for programatically changing the configuration (e.g. installing apps), which even persists back to the configuration file.
Give an ID of your choice to this interface
A table which should provide info regarding the protocol and port over which this interface should run
Select between different protocols for serving the API. There are two so far:
websocket: serve the API as JSON-RPC via WebSockets
http: serve the API as JSON-RPC via HTTP
These are discussed in great detail in Intro to JSON-RPC Interfaces, and the following articles.
An integer value representing the port on the device to run this interface over
Whether to expose admin level functions for dynamically administering the Conductor via this JSON-RPC interface. Defaults to false.
array of InstanceReferenceConfiguration
An array of tables which should provide the IDs of instances to serve over this interface. Only the ones which are listed here will be served.
A reference to the given ID of a defined instance
Example Without Admin
[[interfaces]] id = "websocket interface" [[interfaces.instances]] id = "app spec instance 1" [interfaces.driver] type = "websocket" port = 4000
Example With Admin
[[interfaces]] id = "http interface" admin = true [[interfaces.instances]] id = "app spec instance 1" [interfaces.driver] type = "http" port = 4000
suggest an edit