Closed ankon closed 3 weeks ago
That info can be pulled out of the replacer, see https://github.com/caddyserver/caddy/blob/5db2f81695c27016c154743929fe727cbfa0c8f9/modules/caddyevents/app.go#L245
Oh, gotcha. I didn't know people would want these. Lemme see about exporting them or adding getters.
https://github.com/caddyserver/caddy/blob/5db2f81695c27016c154743929fe727cbfa0c8f9/modules/caddyevents/app.go#L352-354
The timestamp, id, and name/type of the event aren't available to any consumers, which makes actually using these hard. One can use the
CloudEvent()
function to get these values, but that also requires a potentially costly serialization of the complete event data to JSON.Can we add suitable getters for timestamp, id, name/type here?