MCPcopy
hub / github.com/crowdsecurity/crowdsec / OneShot

Method OneShot

pkg/acquisition/modules/journalctl/run.go:20–25  ·  view source on GitHub ↗
(ctx context.Context, out chan pipeline.Event)

Source from the content-addressed store, hash-verified

18const journalctlCmd = "journalctl"
19
20func (s *Source) OneShot(ctx context.Context, out chan pipeline.Event) error {
21 err := s.runJournalCtl(ctx, out)
22 s.logger.Debug("Oneshot acquisition is done")
23
24 return err
25}
26
27func (s *Source) Stream(ctx context.Context, out chan pipeline.Event) error {
28 return s.runJournalCtl(ctx, out)

Callers 1

TestOneShotFunction · 0.95

Calls 2

runJournalCtlMethod · 0.95
DebugMethod · 0.45

Tested by 1

TestOneShotFunction · 0.76