sources

package
v0.0.0-...-5408b11 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSource

func BuildSource(cfg core.Configurator, taskName string) core.Source

`BuildSource` creates a new instance of the source endpoint specified by the configuration object passed as argument.

The `cfg` is the global configuration object. The `taskName` is the name of the task to be executed.

func IsaDatabaseQuerySource

func IsaDatabaseQuerySource(sourceType string) bool

`IsaDatabaseQuerySource` returns true if given source type is an Database Query.

func IsaJSONLFileSource

func IsaJSONLFileSource(sourceType string) bool

func NewDatabaseQuerySource

func NewDatabaseQuerySource(cfg core.Configurator, taskName string) core.Source

`NewDatabaseQuerySource` creates a new instance of the Database Source endpoint.

The `cfg` is the global configuration object. The `taskName` is the name of the task to be executed.

Types

type DatabaseQuerySource

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

`DatabaseQuerySource` is the concrete implementation of the source interface for Oracle databases. It reads data from an Oracle database and sends it to the output processing channel.

func (*DatabaseQuerySource) Run

func (src *DatabaseQuerySource) Run(wg *sync.WaitGroup) <-chan core.RowMap

`Run` creates a goroutine that reads data from the database and sends it to an output channel. It returns a channel that will receive the data read from the database.

type JSONLFileSource

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

`JSONLFileSource` is the concrete implementation of the source interface for JSONLines (or NDJSON) file reader. It reads data from a given file(s) in NDJSON format and send each row to the output processing channel.

func NewJSONLFileSource

func NewJSONLFileSource(cfg core.Configurator, taskName string) *JSONLFileSource

`NewJSONLFileSource` creates a new instance of the JSONLines source endpoint.

The `task` is the name of the task to be executed. The `filename` is the name of the file to be read.

func (*JSONLFileSource) Run

func (src *JSONLFileSource) Run(wg *sync.WaitGroup) <-chan core.RowMap

`Run` creates a goroutine that reads data from the database and sends it to an output channel. It returns a channel that will receive the data read from the database.

Jump to

Keyboard shortcuts

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