procjs

package
v0.9.0-nightly.20240306 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

func Builder(config processor.Config) (processor.Interface, error)

Builder parses the config and if valid returns a JS processor, an error otherwise. It requires the config field "script".

Types

type Processor

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

Processor is able to run processors defined in JavaScript.

func New

func New(src string, logger zerolog.Logger) (*Processor, error)

func (*Processor) Close added in v0.6.0

func (p *Processor) Close()

func (*Processor) InspectIn added in v0.5.0

func (p *Processor) InspectIn(ctx context.Context, id string) *inspector.Session

func (*Processor) InspectOut added in v0.5.0

func (p *Processor) InspectOut(ctx context.Context, id string) *inspector.Session

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, in record.Record) (record.Record, error)

Jump to

Keyboard shortcuts

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