1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

events: Getters for event info (close #6377)

This commit is contained in:
Matthew Holt 2024-06-06 07:11:28 -06:00
parent 5db2f81695
commit 3f1add6c9f
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -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.