Function veilid_core::api_startup

source ·
pub async fn api_startup(
    update_callback: UpdateCallback,
    config_callback: ConfigCallback
) -> VeilidAPIResult<VeilidAPI>
Expand description

Initialize a Veilid node.

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_callback - called at startup to supply a configuration object directly to Veilid

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