output

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIWriter added in v0.1.3

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

The APIWriter is meant to write to a custom API and assumes many things. So currently, it is better not to use this APIWriter.

func NewAPIWriter added in v0.1.3

func NewAPIWriter(wc *config.WriterConfig) *APIWriter

NewAPIWriter returns a new APIWriter

func (*APIWriter) Write added in v0.1.3

func (f *APIWriter) Write(items chan map[string]interface{}, wg *sync.WaitGroup)

type FileWriter added in v0.1.9

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

func NewFileWriter added in v0.1.9

func NewFileWriter(wc *config.WriterConfig) *FileWriter

NewFileWriter returns a new FileWriter

func (*FileWriter) Write added in v0.1.9

func (fr *FileWriter) Write(items chan map[string]interface{}, wg *sync.WaitGroup)

type StdoutWriter added in v0.1.3

type StdoutWriter struct{}

func (*StdoutWriter) Write added in v0.1.3

func (s *StdoutWriter) Write(items chan map[string]interface{}, wg *sync.WaitGroup)

type Writer added in v0.1.3

type Writer interface {
	// if a writer encounters a fatal error it should call log.Fatalf
	// to prevent the crawler from uselessly continuing to run.
	Write(itemsList chan map[string]interface{}, wg *sync.WaitGroup)
}

Jump to

Keyboard shortcuts

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