pub async fn api_startup_json(
    update_callback: UpdateCallback,
    config_json: String
) -> VeilidAPIResult<VeilidAPI>
Expand description

Initialize a Veilid node, with the configuration in JSON format

Must be called only once at the start of an application

  • update_callback - called when internal state of the Veilid node changes, for example, when app-level messages are received, when private routes die and need to be reallocated, or when routing table states change
  • config_json - called at startup to supply a JSON configuration object

Returns a VeilidAPI object that can be used to operate the node