@marcel91200 / caddy Mirror · read-only / commits / 3f1add6c
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 12, 10:45 UTC

events: Getters for event info (close #6377)

Matthew Holt committed Jun 6, 2024 at 07:11 UTC 3f1add6c9f5a41500cd6cfc96c5200d2c8291e14
1 file changed +5
modules/caddyevents/app.go
+5
@@ -355,6 +355,11 @@ type Event struct {
355 origin caddy.Module
356 }
357
358 +func (e Event) ID() uuid.UUID { return e.id }
359 +func (e Event) Timestamp() time.Time { return e.ts }
360 +func (e Event) Name() string { return e.name }
361 +func (e Event) Origin() caddy.Module { return e.origin }
362 +
363 // CloudEvent exports event e as a structure that, when
364 // serialized as JSON, is compatible with the
365 // CloudEvents spec.