logqlanalyzer

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorsMiddleware

func CorsMiddleware() mux.MiddlewareFunc

Types

type Label

type Label struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type LineResult

type LineResult struct {
	OriginLine   string        `json:"origin_line"`
	StageRecords []StageRecord `json:"stage_records"`
}

type LogQLAnalyzeHandler

type LogQLAnalyzeHandler struct {
	// contains filtered or unexported fields
}

func (*LogQLAnalyzeHandler) ServeHTTP

func (s *LogQLAnalyzeHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type PipelineAnalyzer

type PipelineAnalyzer interface {
	AnalyzeLine(line string) []StageAnalysisRecord
}

func NewPipelineAnalyzer

func NewPipelineAnalyzer(origin log.Pipeline, streamLabels labels.Labels) PipelineAnalyzer

type Request

type Request struct {
	Query string   `json:"query"`
	Logs  []string `json:"logs"`
}

type Result

type Result struct {
	StreamSelector string       `json:"stream_selector"`
	Stages         []string     `json:"stages"`
	Results        []LineResult `json:"results"`
}

type StageAnalysisRecord

type StageAnalysisRecord struct {
	Processed    bool
	LineBefore   string
	LabelsBefore labels.Labels
	LineAfter    string
	LabelsAfter  labels.Labels
	FilteredOut  bool
}

type StageAnalysisRecorder

type StageAnalysisRecorder struct {
	log.Stage
	// contains filtered or unexported fields
}

func (StageAnalysisRecorder) Process

func (s StageAnalysisRecorder) Process(ts int64, line []byte, lbs *log.LabelsBuilder) ([]byte, bool)

func (StageAnalysisRecorder) RequiredLabelNames

func (s StageAnalysisRecorder) RequiredLabelNames() []string

type StageRecord

type StageRecord struct {
	LineBefore   string  `json:"line_before"`
	LabelsBefore []Label `json:"labels_before"`
	LineAfter    string  `json:"line_after"`
	LabelsAfter  []Label `json:"labels_after"`
	FilteredOut  bool    `json:"filtered_out"`
}

Jump to

Keyboard shortcuts

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