mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 14:13:48 +03:00
events: Getters for event info (close #6377)
This commit is contained in:
parent
5db2f81695
commit
3f1add6c9f
1 changed files with 5 additions and 0 deletions
|
@ -355,6 +355,11 @@ type Event struct {
|
||||||
origin caddy.Module
|
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
|
// CloudEvent exports event e as a structure that, when
|
||||||
// serialized as JSON, is compatible with the
|
// serialized as JSON, is compatible with the
|
||||||
// CloudEvents spec.
|
// CloudEvents spec.
|
||||||
|
|
Loading…
Reference in a new issue