Documentation ¶
Index ¶
- Constants
- Variables
- func InitHandler(_ context.Context, raw config.ConfigRaw) (config.TypeCodecConfig, error)
- type Codec
- func (c *Codec) Decode(_ context.Context, data interface{}, eventExtra map[string]interface{}, ...) (ok bool, err error)
- func (c *Codec) DecodeEvent(data []byte, event *logevent.LogEvent) (err error)
- func (c *Codec) Encode(_ context.Context, event logevent.LogEvent, dataChan chan<- []byte) (ok bool, err error)
Constants ¶
View Source
const ErrorTag = "gogstash_codec_xml_error"
ErrorTag tag added to event when process module failed
View Source
const ModuleName = "xml"
ModuleName is the name used in config file
Variables ¶
View Source
var NotImplementedError = errors.New("not implemented")
Functions ¶
func InitHandler ¶
InitHandler initialize the codec plugin
Types ¶
type Codec ¶
type Codec struct { config.CodecConfig TryCast bool `json:"try_cast" yaml:"try_cast"` // attempt to cast types from string RootTag string `json:"root_tag" yaml:"root_tag"` // root tag on encoder }
Codec default struct for XML
func (*Codec) Decode ¶
func (c *Codec) Decode(_ context.Context, data interface{}, eventExtra map[string]interface{}, tags []string, msgChan chan<- logevent.LogEvent) (ok bool, err error)
Decode returns an event from 'data' as XML format
func (*Codec) DecodeEvent ¶
DecodeEvent decodes 'data' as XML format to event
Click to show internal directories.
Click to hide internal directories.