artifact_loader

package
v0.5.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FileLoaderIdentifier = "file_loader"
View Source
const FileRowLoaderIdentifier = "file_row_loader"
View Source
const GzipLoaderIdentifier = "gzip_loader"
View Source
const GzipRowLoaderIdentifier = "gzip_row_loader"
View Source
const NullLoaderIdentifier = "null_loader"

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLoader

type FileLoader struct {
}

FileLoader is an Loader that can loads a file from a path and extracts all the content

func (FileLoader) Identifier

func (g FileLoader) Identifier() string

func (FileLoader) Load

func (g FileLoader) Load(_ context.Context, info *types.DownloadedArtifactInfo, dataChan chan *types.RowData) error

Load implements Loader Extracts an object from a file

type FileRowLoader

type FileRowLoader struct {
}

FileRowLoader is an Loader that can loads a file from a path and extracts the contenst a line at a time

func (FileRowLoader) Identifier

func (g FileRowLoader) Identifier() string

func (FileRowLoader) Load

func (g FileRowLoader) Load(ctx context.Context, info *types.DownloadedArtifactInfo, dataChan chan *types.RowData) error

Load implements Loader Extracts an object from a file

type GzipLoader

type GzipLoader struct {
}

GzipLoader is an Loader that can extracts a gzip file and returns all the content

func (GzipLoader) Identifier

func (g GzipLoader) Identifier() string

func (GzipLoader) Load

func (g GzipLoader) Load(ctx context.Context, info *types.DownloadedArtifactInfo, dataChan chan *types.RowData) error

Load implements Loader Extracts an object from a gzip file

type GzipRowLoader

type GzipRowLoader struct {
}

GzipRowLoader is an Loader that can extracts an object from a gzip file

func (GzipRowLoader) Identifier

func (g GzipRowLoader) Identifier() string

func (GzipRowLoader) Load

func (g GzipRowLoader) Load(ctx context.Context, info *types.DownloadedArtifactInfo, dataChan chan *types.RowData) error

Load implements Loader Extracts an object from a gzip file

type Loader

type Loader interface {
	Identifier() string
	// Load locally saved artifact data and perform any necessary decompression/decryption
	Load(context.Context, *types.DownloadedArtifactInfo, chan *types.RowData) error
}

Loader is an interface which provides a method for loading a locally saved artifact Sources provided by the SDK: GzipLoader, GzipRowLoader, [FileSystemLoader], [FileSystemRowLoader]

func NewFileLoader

func NewFileLoader() Loader

func NewFileRowLoader

func NewFileRowLoader() Loader

func NewGzipLoader

func NewGzipLoader() Loader

func NewGzipRowLoader

func NewGzipRowLoader() Loader

func NewNullLoader

func NewNullLoader() Loader

type NullLoader

type NullLoader struct {
}

NullLoader is an Loader that does nothing - it does not extract rows so will generate no row events this is used for tables which process the artifact directly, e.g. cav table which converts the csv directly to JSONL

func (NullLoader) Identifier

func (g NullLoader) Identifier() string

func (NullLoader) Load

func (g NullLoader) Load(_ context.Context, _ *types.DownloadedArtifactInfo, dataChan chan *types.RowData) error

Load implements Loader Extracts an object from a file

Jump to

Keyboard shortcuts

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