@@ -58,7 +58,7 @@ type Config struct {
5858 FileConfig
5959 SyslogConfig
6060 ESConfig
61- FindingsConfig
61+ KafkaConfig
6262}
6363
6464// CreateConfig creates a new config object from config dictionary.
@@ -125,7 +125,7 @@ func CreateConfig(conf map[string]interface{}) (c Config, err error) {
125125 if err != nil {
126126 return
127127 }
128- c .FindingsConfig , err = CreateFindingsConfig (c , conf )
128+ c .KafkaConfig , err = CreateKafkaConfig (c , conf )
129129
130130 return
131131}
@@ -139,12 +139,12 @@ const (
139139 FileTransport
140140 SyslogTransport
141141 ESTransport
142- FindingsTransport
142+ KafkaTransport
143143 NullTransport
144144)
145145
146146func (s Transport ) String () string {
147- return [... ]string {"terminal" , "file" , "syslog" , "es" , "findings " , "null" }[s ]
147+ return [... ]string {"terminal" , "file" , "syslog" , "es" , "kafka " , "null" }[s ]
148148}
149149
150150func parseTransportConfig (s string ) Transport {
@@ -157,8 +157,8 @@ func parseTransportConfig(s string) Transport {
157157 if ESTransport .String () == s {
158158 return ESTransport
159159 }
160- if FindingsTransport .String () == s {
161- return FindingsTransport
160+ if KafkaTransport .String () == s {
161+ return KafkaTransport
162162 }
163163 if NullTransport .String () == s {
164164 return NullTransport
@@ -171,13 +171,13 @@ type Format int
171171
172172// Format config options.
173173const (
174- JSONFormat Format = iota // JSON schema
175- ECSFormat // Elastic Common Schema
176- OccurrenceFormat // IBM Findings Occurrence
174+ JSONFormat Format = iota // JSON schema
175+ ECSFormat // Elastic Common Schema
176+ OtelFormat // Open Telemetry schema
177177)
178178
179179func (s Format ) String () string {
180- return [... ]string {"json" , "ecs" , "occurrence " }[s ]
180+ return [... ]string {"json" , "ecs" , "otel " }[s ]
181181}
182182
183183func parseFormatConfig (s string ) Format {
@@ -186,8 +186,8 @@ func parseFormatConfig(s string) Format {
186186 return JSONFormat
187187 case ECSFormat .String ():
188188 return ECSFormat
189- case OccurrenceFormat .String ():
190- return OccurrenceFormat
189+ case OtelFormat .String ():
190+ return OtelFormat
191191 }
192192 return JSONFormat
193193}
0 commit comments