MCPcopy Index your code
hub / github.com/rabbitstack/fibratus / GetParamAsString

Method GetParamAsString

pkg/event/event.go:348–354  ·  view source on GitHub ↗

GetParamAsString returns the specified parameter value as string. Parameter values are resolved according to their types. For instance, if the parameter type is `Status`, the system error code is converted to the error message. Returns an empty string if the given parameter name is not found in even

(name string)

Source from the content-addressed store, hash-verified

346// Returns an empty string if the given parameter name is not found
347// in event parameters.
348func (e *Event) GetParamAsString(name string) string {
349 par, err := e.Params.Get(name)
350 if err != nil {
351 return ""
352 }
353 return par.String()
354}
355
356// GetFlagsAsSlice returns parameter flags as a slice of bitmask string values.
357func (e *Event) GetFlagsAsSlice(name string) []string {

Callers 15

TestAddModuleFunction · 0.95
GetFlagsAsSliceMethod · 0.95
IsSuccessMethod · 0.95
SummaryMethod · 0.95
MarshalRawMethod · 0.95
MarshalJSONMethod · 0.95
TransformMethod · 0.80
TransformMethod · 0.80
unwrapHandleFunction · 0.80
AddModuleMethod · 0.80
AddMmapMethod · 0.80

Calls 2

GetMethod · 0.65
StringMethod · 0.65

Tested by 15

TestAddModuleFunction · 0.76
TestGetFileInfoFunction · 0.64
TestStackwalkDecoratorFunction · 0.64
TestEventSourceAllEventsFunction · 0.64
testCallstackEnrichmentFunction · 0.64
TestModuleProcessorFunction · 0.64
TestRegistryProcessorFunction · 0.64
TestPsProcessorFunction · 0.64
TestMemProcessorFunction · 0.64