diff options
author | Matthew Holt <[email protected]> | 2024-06-06 07:11:28 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2024-06-06 07:11:28 -0600 |
commit | 3f1add6c9f5a41500cd6cfc96c5200d2c8291e14 (patch) | |
tree | b1edc9ad7fca21125477e0f3c147703b5eaba99e | |
parent | 5db2f81695c27016c154743929fe727cbfa0c8f9 (diff) | |
download | caddy-3f1add6c9f5a41500cd6cfc96c5200d2c8291e14.tar.gz caddy-3f1add6c9f5a41500cd6cfc96c5200d2c8291e14.zip |
events: Getters for event info (close #6377)
-rw-r--r-- | modules/caddyevents/app.go | 5 |
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. |