EventMetadata

init

Creates an EventMetadata instance for the given event type and payload.

NameTypeRequiredDefaultDescription

type

string

true

The event type to track metadata for.

payload

struct

false

{}

The metadata to track.

Return: The EventMetadata instance.

getMemento

Converts the EventMetadata instance to a serializable format.

NameTypeRequiredDefaultDescription

No arguments

Return: (struct) A struct representing this EventMetadata instance.

{
    "event_type": "type",
    "event_payload": { ... } 
}

Last updated