napi_get_instance_data
napi_status napi_get_instance_data(napi_env env,
void** data); [in] env:调用 Node-API 时所处的环境。[out] data:之前通过调用napi_set_instance_data()与当前正在运行的 Agent 关联的数据项。
如果 API 成功,则返回 napi_ok。
🌐 Returns napi_ok if the API succeeded.
此 API 检索先前通过 napi_set_instance_data() 与当前运行的 Agent 关联的数据。如果未设置任何数据,调用将成功且 data 会被设为 NULL。
🌐 This API retrieves data that was previously associated with the currently
running Agent via napi_set_instance_data(). If no data is set, the call will
succeed and data will be set to NULL.