pipeline

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapString

func WrapString(str string, width int) string

Types

type LogEntry

type LogEntry struct {
	Show      bool
	Raw       string
	Formatted string
	Json      map[string]interface{}
	Height    int
	CumHeight int
	Index     int
}

type LogFilter

type LogFilter struct {
	FilterExpr string
	Filter     *vm.Program
	Default    bool
}

func (*LogFilter) Compile

func (lf *LogFilter) Compile() error

func (*LogFilter) RunFilter

func (lf *LogFilter) RunFilter(l *LogEntry) error

type LogFormat

type LogFormat struct {
	ReturnedFields []string
	Width          uint
	Highlight      bool
}

func (*LogFormat) RunReturnedFieldsAndFormat

func (lt *LogFormat) RunReturnedFieldsAndFormat(l *LogEntry) error

type LogPipeline

type LogPipeline struct {
	Pipeline []func(*LogEntry) error

	Cfg *config.View
	// contains filtered or unexported fields
}

func New

func New(cfg *config.View, width uint) (*LogPipeline, error)

func (*LogPipeline) Reset

func (lp *LogPipeline) Reset()

func (*LogPipeline) Run

func (lp *LogPipeline) Run(l *LogEntry) error

func (*LogPipeline) RunFilterChanged

func (lp *LogPipeline) RunFilterChanged(l *LogEntry) error

func (*LogPipeline) RunReturnedFieldsChanged

func (lp *LogPipeline) RunReturnedFieldsChanged(l *LogEntry) error

func (*LogPipeline) RunViewChanged

func (lp *LogPipeline) RunViewChanged(l *LogEntry) error

func (*LogPipeline) RunWidthChanged

func (lp *LogPipeline) RunWidthChanged(l *LogEntry) error

func (*LogPipeline) SetFilter

func (lp *LogPipeline) SetFilter(filter string) error

func (*LogPipeline) SetReturnedFields

func (lp *LogPipeline) SetReturnedFields(fields []string) error

func (*LogPipeline) SetTransforms

func (lp *LogPipeline) SetTransforms(transforms []config.Transform) error

func (*LogPipeline) SetView

func (lp *LogPipeline) SetView(view *config.View) error

func (*LogPipeline) SetWidth

func (lp *LogPipeline) SetWidth(width uint) error

type LogTransform

type LogTransform struct {
	Transforms []func(*LogEntry) error
}

func (*LogTransform) RunTransform

func (lt *LogTransform) RunTransform(l *LogEntry) error

Jump to

Keyboard shortcuts

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