Source Events ↗

node.identity_generated

Node identity was generated.

When
First boot with empty uuid/token_id/token fields.
Payload
JSON: { uuid, token_id }.
Cancelable
No

The token secret is never emitted.

Use cases

  • First boot inventory
  • Operator notifications

Example

Registration and handler

Register

hook!(host, PluginEvent::NodeIdentityGenerated, on_identity);

Handler

extern "C" fn on_event(ctx: *const EventContext) -> HookResult {
    let ctx = unsafe { &*ctx };
    let payload = unsafe { std::slice::from_raw_parts(ctx.payload_ptr, ctx.payload_len) };
    let _json = std::str::from_utf8(payload).unwrap_or_default();
    HookResult::r#continue()
}

← All lifecycle events