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

Method ProcessEvent

internal/etw/processors/chain.go:48–70  ·  view source on GitHub ↗
(e *event.Event)

Source from the content-addressed store, hash-verified

46}
47
48func (c chain) ProcessEvent(e *event.Event) (*event.Event, error) {
49 var errs = make([]error, 0)
50 var evt *event.Event
51
52 for _, processor := range c.processors {
53 var err error
54 var next bool
55 evt, next, err = processor.ProcessEvent(e)
56 if err != nil {
57 processorFailures.Add(1)
58 errs = append(errs, fmt.Errorf("%q processor failed with error: %v", processor.Name(), err))
59 continue
60 }
61 if !next {
62 break
63 }
64 }
65 if len(errs) > 0 {
66 return evt, multierror.Wrap(errs...)
67 }
68
69 return evt, nil
70}
71
72// Close closes the processor chain and frees all allocated resources.
73func (c chain) Close() error {

Callers

nothing calls this directly

Calls 4

WrapFunction · 0.92
ProcessEventMethod · 0.65
AddMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected