procjs

package
v0.4.0-nightly.20221129 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 6 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) Process

func (p *Processor) Process(_ 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