commands

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(maxEntries int64,
	reader readers.Reader,
	mapper mappers.Mapper,
	filter filters.EntryFilter,
	processor processors.Processor) error

Executes the workflow using the given parameters: maxEntries: the maximum number of processed entries reader: a reader component for reading the input source mapper: a mapper component for extracting the log entries filter: a filter component for filtering the log entries processor: a processor component for processing the filtered entries

Types

type Command

type Command interface {
	Execute() error
}

Interface that defines the commands available

type CountCommand

type CountCommand struct {
	Layout     string
	InputFiles []string
	Filter     filters.EntryFilter
	MaxEntries int64
	Groups     []string
	Formatter  processors.Formatter
	Writer     io.Writer
}

A structure that defines the print command

func (CountCommand) Execute

func (command CountCommand) Execute() error

Prints the filtered entries

type PrintCommand

type PrintCommand struct {
	Layout     string
	Format     string
	InputFiles []string
	Filter     filters.EntryFilter
	MaxEntries int64
	Writer     io.Writer
}

A structure that defines the print command

func (PrintCommand) Execute

func (command PrintCommand) Execute() error

Prints the filtered entries

Jump to

Keyboard shortcuts

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