jsonl

package
v3.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

func New

func New(options *Options) (*Exporter, error)

New creates a new JSONL exporter integration client based on options.

func (*Exporter) Close

func (exporter *Exporter) Close() error

Close writes the in-memory data to the JSONL file specified by options.JSONLExport and closes the exporter after operation

func (*Exporter) Export

func (exporter *Exporter) Export(event *output.ResultEvent) error

Export appends the passed result event to the list of objects to be exported to the resulting JSONL file

func (*Exporter) WriteRows added in v3.3.6

func (exporter *Exporter) WriteRows() error

WriteRows writes all rows from the rows list to JSONL file and removes them from the list

type Options

type Options struct {
	// File is the file to export found JSONL result to
	File string `yaml:"file"`
	// OmitRaw whether to exclude the raw request and response from the output
	OmitRaw bool `yaml:"omit-raw"`
	// BatchSize the number of records to keep in memory before writing them out to the JSONL file or 0 to disable
	// batching (default)
	BatchSize int `yaml:"batch-size"`
}

Options contains the configuration options for JSONL exporter client

Jump to

Keyboard shortcuts

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