Documentation
¶
Index ¶
Constants ¶
View Source
const ( Auto ContainerFormat = iota + 1 CRI Docker JSONFile All Stream = iota + 1 Stdout Stderr )
Variables ¶
This section is empty.
Functions ¶
func MergeJSONFields ¶
func MergeJSONFields(data util.MapStr, jsonFields util.MapStr, text *string, config Config) (string, time.Time)
MergeJSONFields writes the JSON fields in the event map, respecting the KeysUnderRoot, ExpandKeys, and OverwriteKeys configuration options. If MessageKey is defined, the Text value from the event always takes precedence.
Types ¶
type Config ¶
type Config struct { MessageKey string `config:"message_key"` DocumentID string `config:"document_id"` KeysUnderRoot bool `config:"keys_under_root"` OverwriteKeys bool `config:"overwrite_keys"` AddErrorKey bool `config:"add_error_key"` IgnoreDecodingError bool `config:"ignore_decoding_error"` ExpandKeys bool `config:"expand_keys"` }
Config holds the options a JSON reader.
type ContainerFormat ¶
type ContainerFormat uint8
func (*ContainerFormat) Unpack ¶
func (f *ContainerFormat) Unpack(v string) error
type ContainerJSONConfig ¶
type ContainerJSONConfig struct { Stream Stream `config:"stream"` Format ContainerFormat `config:"format"` }
func DefaultContainerConfig ¶
func DefaultContainerConfig() ContainerJSONConfig
type DockerJSONReader ¶
type DockerJSONReader struct {
// contains filtered or unexported fields
}
DockerJSONReader processor renames a given field
func New ¶
func New(r reader.Reader, stream string, partial bool, format string, CRIFlags bool) *DockerJSONReader
New creates a new reader renaming a field
func NewContainerParser ¶
func NewContainerParser(r reader.Reader, config *ContainerJSONConfig) *DockerJSONReader
func (*DockerJSONReader) Close ¶
func (p *DockerJSONReader) Close() error
type JSONParser ¶
type JSONParser struct { JSONReader // contains filtered or unexported fields }
func NewJSONParser ¶
func NewJSONParser(r reader.Reader, cfg *ParserConfig) *JSONParser
type JSONReader ¶
type JSONReader struct {
// contains filtered or unexported fields
}
JSONReader parses JSON inputs
func NewJSONReader ¶
func NewJSONReader(r reader.Reader, cfg *Config) *JSONReader
NewJSONReader creates a new reader that can decode JSON.
func (*JSONReader) Close ¶
func (r *JSONReader) Close() error
type ParserConfig ¶
Click to show internal directories.
Click to hide internal directories.