decoder

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	// Decode reader to logs
	Decode(data []byte, req *http.Request, tags map[string]string) (logs []*protocol.Log, err error)
	// DecodeV2 reader to groupEvents
	DecodeV2(data []byte, req *http.Request) (groups []*models.PipelineGroupEvents, err error)
	// ParseRequst gets the request's body raw data and status code.
	ParseRequest(res http.ResponseWriter, req *http.Request, maxBodySize int64) (data []byte, statusCode int, err error)
}

Decoder used to parse buffer to sls logs

func GetDecoder

func GetDecoder(format string) (Decoder, error)

GetDecoder return a new decoder for specific format

func GetDecoderWithOptions added in v1.4.0

func GetDecoderWithOptions(format string, option Option) (Decoder, error)

type Option added in v1.4.0

type Option struct {
	FieldsExtend      bool
	DisableUncompress bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL