pipeline

package
v0.0.0-...-175a4df Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

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

func New

func New(log *util.Logger, cc Settings) (*Pipeline, error)

func (*Pipeline) Process

func (p *Pipeline) Process(in []byte) ([]byte, error)

func (*Pipeline) WithDecode

func (p *Pipeline) WithDecode(decode string) (*Pipeline, error)

WithDecode adds data decoding

func (*Pipeline) WithJq

func (p *Pipeline) WithJq(jq string) (*Pipeline, error)

WithJq adds a jq query applied to the mqtt listener payload

func (*Pipeline) WithRegex

func (p *Pipeline) WithRegex(regex, dflt string) (*Pipeline, error)

WithRegex adds a regex query applied to the mqtt listener payload

func (*Pipeline) WithScript

func (p *Pipeline) WithScript(vm, script string) (*Pipeline, error)

WithScript adds a javascript script to process the response

func (*Pipeline) WithUnpack

func (p *Pipeline) WithUnpack(unpack string) (*Pipeline, error)

WithUnpack adds data unpacking

type Settings

type Settings struct {
	Regex   string
	Default string
	Jq      string
	Unpack  string
	Decode  string
	VM      string
	Script  string
}

Jump to

Keyboard shortcuts

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