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

Method Configure

pkg/acquisition/modules/journalctl/config.go:67–77  ·  view source on GitHub ↗
(_ context.Context, yamlConfig []byte, logger *log.Entry, metricsLevel metrics.AcquisitionMetricsLevel)

Source from the content-addressed store, hash-verified

65}
66
67func (s *Source) Configure(_ context.Context, yamlConfig []byte, logger *log.Entry, metricsLevel metrics.AcquisitionMetricsLevel) error {
68 if err := s.UnmarshalConfig(yamlConfig); err != nil {
69 return err
70 }
71
72 s.setLogger(logger, 0, s.src)
73
74 s.metricsLevel = metricsLevel
75
76 return nil
77}
78
79func (s *Source) ConfigureByDSN(_ context.Context, dsn string, labels map[string]string, logger *log.Entry, uuid string) error {
80 var (

Callers 2

TestOneShotFunction · 0.95
TestStreamingFunction · 0.95

Calls 2

UnmarshalConfigMethod · 0.95
setLoggerMethod · 0.95

Tested by 2

TestOneShotFunction · 0.76
TestStreamingFunction · 0.76