extensions

package
v0.0.0-...-7b0021b Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAuthenticator

type ClientAuthenticator interface {
	RequestInterceptor
}

ClientAuthenticator allow adding auth or signature info to HTTP client request

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)
	// ParseRequest 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

type Encoder

type Encoder interface {
	EncoderV1
	EncoderV2
}

Encoder encodes data of iLogtail data models into bytes. Different drivers with different encoding protocols implement Encoder interface.

drivers: raw, influxdb, prometheus, sls, ...

type EncoderExtension

type EncoderExtension interface {
	Encoder
	pipeline.Extension
}

type EncoderV1

type EncoderV1 interface {
	EncodeV1(*protocol.LogGroup) ([][]byte, error)
	EncodeBatchV1([]*protocol.LogGroup) ([][]byte, error)
}

EncoderV1 supports v1 pipeline plugin interface, encodes data of v1 model into bytes.

drivers: sls, influxdb, ...

type EncoderV2

type EncoderV2 interface {
	EncodeV2(*models.PipelineGroupEvents) ([][]byte, error)
	EncodeBatchV2([]*models.PipelineGroupEvents) ([][]byte, error)
}

EncoderV2 supports v2 pipeline plugin interface, encodes data of v2 model into bytes.

drivers: raw, influxdb, prometheus, ...

type ExtensionConfig

type ExtensionConfig struct {
	Type    string
	Options map[string]interface{}
}

type FlushInterceptor

type FlushInterceptor interface {
	Intercept(group *models.PipelineGroupEvents) *models.PipelineGroupEvents
}

type RequestInterceptor

type RequestInterceptor interface {
	// RoundTripper returns a RoundTripper that can be used to intercept the HTTP requests
	RoundTripper(base http.RoundTripper) (http.RoundTripper, error)
}

RequestInterceptor allow custom modifications to the HTTP request before sending

Jump to

Keyboard shortcuts

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