MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / AddMeta

Method AddMeta

pkg/event/event.go:249–256  ·  view source on GitHub ↗

AddMeta appends a key/value pair to event's metadata.

(k MetadataKey, v any)

Source from the content-addressed store, hash-verified

247
248// AddMeta appends a key/value pair to event's metadata.
249func (e *Event) AddMeta(k MetadataKey, v any) {
250 e.mmux.Lock()
251 defer e.mmux.Unlock()
252 if e.Metadata == nil {
253 e.Metadata = make(map[MetadataKey]any)
254 }
255 e.Metadata[k] = v
256}
257
258// AddOrAppendMetaSlice puts the provided string into the slice if the key
259// doesn't exist or appends the string to the slice.

Callers 7

AddOrAppendMetaSliceMethod · 0.95
AddSequenceLinkMethod · 0.95
UnmarshalRawMethod · 0.95
TransformMethod · 0.80
appendMatchMethod · 0.80
addPartialMethod · 0.80
emitMethod · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected