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

Function NewEventSource

internal/etw/source.go:96–117  ·  view source on GitHub ↗

NewEventSource creates the new ETW event source.

(
	psnap ps.Snapshotter,
	hsnap handle.Snapshotter,
	config *config.Config,
	compiler *config.RulesCompileResult,
)

Source from the content-addressed store, hash-verified

94
95// NewEventSource creates the new ETW event source.
96func NewEventSource(
97 psnap ps.Snapshotter,
98 hsnap handle.Snapshotter,
99 config *config.Config,
100 compiler *config.RulesCompileResult,
101) source.EventSource {
102 evs := &EventSource{
103 r: compiler,
104 traces: make([]*Trace, 0),
105 consumers: make([]*Consumer, 0),
106 processors: processors.NewChain(psnap, hsnap, config),
107 errs: make(chan error, 1000),
108 evts: make(chan *event.Event, 500),
109 sequencer: event.NewSequencer(),
110 config: config,
111 stop: make(chan struct{}),
112 psnap: psnap,
113 hsnap: hsnap,
114 listeners: make([]event.Listener, 0),
115 }
116 return evs
117}
118
119// Open configures and starts traces and event consumers.
120func (e *EventSource) Open(config *config.Config) error {

Calls 2

NewChainFunction · 0.92
NewSequencerFunction · 0.92