parser

package
v0.0.0-...-62bf4b9 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package parser handles parsing log files based on the SQL execution type.

Package parser handles parsing log files based on the SQL execution type.

Package parser handles parsing log files based on the SQL execution type.

Package parser handles parsing log files based on the SQL execution type.

Package parser handles parsing log files based on the SQL execution type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogPaths

func GetLogPaths(query *sqlquery.QueryParams, logRoot string) []string

GetLogPaths returns all log paths matching a query

func GetLogPathsForApp

func GetLogPathsForApp(query *sqlquery.QueryParams, appName, logRoot string) []string

GetLogPathsForApp returns all log paths matching a query for a specified app

func Query

func Query(queryString string) interface{}

Query executes a given query string.

Types

type ArrayResults

type ArrayResults struct {
	Type    string    `json:"type"`
	Results *[]string `json:"results"`
}

ArrayResults does stuff

func (ArrayResults) MarshalEasyJSON

func (v ArrayResults) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ArrayResults) MarshalJSON

func (v ArrayResults) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ArrayResults) UnmarshalEasyJSON

func (v *ArrayResults) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ArrayResults) UnmarshalJSON

func (v *ArrayResults) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ChannelResults

type ChannelResults struct {
	Type    string
	Channel chan []byte
}

ChannelResults returns array results through a channel

type IntResults

type IntResults struct {
	Type    string `json:"type"`
	Results int    `json:"results"`
}

IntResults does stuff

func (IntResults) MarshalEasyJSON

func (v IntResults) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (IntResults) MarshalJSON

func (v IntResults) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*IntResults) UnmarshalEasyJSON

func (v *IntResults) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*IntResults) UnmarshalJSON

func (v *IntResults) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type LogQueryStruct

type LogQueryStruct struct {
	LogPath     string
	LineNumbers [][]int
}

LogQueryStruct contains all information about a log file, including the matching entries to the query.

type ObjectResults

type ObjectResults struct {
	Type    string          `json:"type"`
	Results *map[string]int `json:"results"`
}

ObjectResults does stuff

func (ObjectResults) MarshalEasyJSON

func (v ObjectResults) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ObjectResults) MarshalJSON

func (v ObjectResults) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ObjectResults) UnmarshalEasyJSON

func (v *ObjectResults) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ObjectResults) UnmarshalJSON

func (v *ObjectResults) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TidalwaveParser

type TidalwaveParser struct {
	MaxParallelism int
	LogPaths       []string
	Query          *sqlquery.QueryParams
}

TidalwaveParser does stuff

func (*TidalwaveParser) Count

func (tp *TidalwaveParser) Count() int

Count executes a COUNT() query over log results. SELECT COUNT(*) FROM testapp WHERE date > '2016-10-05'

func (*TidalwaveParser) CountDistinct

func (tp *TidalwaveParser) CountDistinct() *map[string]int

CountDistinct executes a COUNT(DISTINCT()) query over log results. SELECT COUNT(DISTINCT(line.cmd)) FROM testapp WHERE date > '2016-10-05'

func (*TidalwaveParser) Distinct

func (tp *TidalwaveParser) Distinct() *[]string

Distinct executes a DISTINCT() query over log results. SELECT DISTINCT(line.cmd) FROM testapp WHERE date > '2016-10-05'

func (*TidalwaveParser) Search

func (tp *TidalwaveParser) Search() chan []byte

Search executes a normal match query over log results. SELECT * FROM testapp WHERE date > '2016-10-05'

Jump to

Keyboard shortcuts

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