aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2024-06-06 07:11:28 -0600
committerMatthew Holt <[email protected]>2024-06-06 07:11:28 -0600
commit3f1add6c9f5a41500cd6cfc96c5200d2c8291e14 (patch)
treeb1edc9ad7fca21125477e0f3c147703b5eaba99e
parent5db2f81695c27016c154743929fe727cbfa0c8f9 (diff)
downloadcaddy-3f1add6c9f5a41500cd6cfc96c5200d2c8291e14.tar.gz
caddy-3f1add6c9f5a41500cd6cfc96c5200d2c8291e14.zip
events: Getters for event info (close #6377)
-rw-r--r--modules/caddyevents/app.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/caddyevents/app.go b/modules/caddyevents/app.go
index 902c6d842..fe76a6757 100644
--- a/modules/caddyevents/app.go
+++ b/modules/caddyevents/app.go
@@ -355,6 +355,11 @@ type Event struct {
origin caddy.Module
}
+func (e Event) ID() uuid.UUID { return e.id }
+func (e Event) Timestamp() time.Time { return e.ts }
+func (e Event) Name() string { return e.name }
+func (e Event) Origin() caddy.Module { return e.origin }
+
// CloudEvent exports event e as a structure that, when
// serialized as JSON, is compatible with the
// CloudEvents spec.