processor

package
v0.2.84 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlazeProcessor

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

func NewGlazeProcessor

func NewGlazeProcessor(of formatters.OutputFormatter, options ...GlazeProcessorOption) *GlazeProcessor

func (*GlazeProcessor) OutputFormatter

func (gp *GlazeProcessor) OutputFormatter() formatters.OutputFormatter

func (*GlazeProcessor) ProcessInputObject

func (gp *GlazeProcessor) ProcessInputObject(ctx context.Context, obj map[string]interface{}) error

ProcessInputObject takes an input object and processes it through the object middleware chain.

The final output is added to the output formatter as a single row.

type GlazeProcessorOption added in v0.2.83

type GlazeProcessorOption func(*GlazeProcessor)

func WithAppendObjectMiddleware added in v0.2.83

func WithAppendObjectMiddleware(om ...middlewares.ObjectMiddleware) GlazeProcessorOption

func WithOutputFormatter added in v0.2.83

func WithOutputFormatter(of formatters.OutputFormatter) GlazeProcessorOption

func WithPrependObjectMiddleware added in v0.2.83

func WithPrependObjectMiddleware(om ...middlewares.ObjectMiddleware) GlazeProcessorOption

type Processor

type Processor interface {
	ProcessInputObject(ctx context.Context, obj map[string]interface{}) error
	OutputFormatter() formatters.OutputFormatter
}

type SimpleGlazeProcessor

type SimpleGlazeProcessor struct {
	*GlazeProcessor
	// contains filtered or unexported fields
}

SimpleGlazeProcessor only collects the output and returns it as a types.Table

func NewSimpleGlazeProcessor

func NewSimpleGlazeProcessor(options ...GlazeProcessorOption) *SimpleGlazeProcessor

func (*SimpleGlazeProcessor) GetTable

func (gp *SimpleGlazeProcessor) GetTable() *types.Table

Jump to

Keyboard shortcuts

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