Remove embedded WriteEvent from WrittenEvent struct, to avoid having unnecessary fields. (#101081)
This commit is contained in:
@@ -21,18 +21,24 @@ type WriteEvent struct {
|
||||
ObjectOld utils.GrafanaMetaAccessor
|
||||
}
|
||||
|
||||
// WriteEvents after they include a resource version
|
||||
// WrittenEvent is a WriteEvent reported with a resource version.
|
||||
type WrittenEvent struct {
|
||||
WriteEvent
|
||||
Type WatchEvent_Type
|
||||
Key *ResourceKey
|
||||
PreviousRV int64
|
||||
|
||||
// The json payload (without resourceVersion)
|
||||
Value []byte
|
||||
|
||||
// Metadata
|
||||
Folder string
|
||||
|
||||
// The resource version
|
||||
// The resource version.
|
||||
ResourceVersion int64
|
||||
|
||||
// Timestamp when the event is created
|
||||
Timestamp int64
|
||||
}
|
||||
|
||||
// A function to write events
|
||||
// EventAppender is a function to write events.
|
||||
type EventAppender = func(context.Context, *WriteEvent) (int64, error)
|
||||
|
||||
Reference in New Issue
Block a user