scraper

package
v1.10.39 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 17 Imported by: 8

Documentation

Overview

Package scraper is a generated GoMock package.

Package scraper is a generated GoMock package.

Package scraper is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveFilesystemExtractor added in v1.10.34

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

func NewArchiveFilesystemExtractor added in v1.10.34

func NewArchiveFilesystemExtractor(fs filesystem.FileSystem) *ArchiveFilesystemExtractor

func (*ArchiveFilesystemExtractor) Extract added in v1.10.34

func (e *ArchiveFilesystemExtractor) Extract(ctx context.Context, paths []string, process ProcessFn) error

type DataType added in v1.10.34

type DataType string
const (
	// DataTypeRaw specifies that the object is a raw file
	DataTypeRaw DataType = "raw"
	// DataTypeTarball specifies that the object is a tarball (gzip compressed tar archive)
	DataTypeTarball = "tarball"
)

type ExtractLoadScraper added in v1.10.34

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

func NewExtractLoadScraper added in v1.10.34

func NewExtractLoadScraper(extractor Extractor, loader Uploader) *ExtractLoadScraper

func (*ExtractLoadScraper) Scrape added in v1.10.34

func (s *ExtractLoadScraper) Scrape(ctx context.Context, paths []string, execution testkube.Execution) error

type Extractor added in v1.9.23

type Extractor interface {
	Extract(ctx context.Context, paths []string, process ProcessFn) error
}

type MinIOUploader added in v1.9.36

type MinIOUploader struct {
	Endpoint, AccessKeyID, SecretAccessKey, Region, Token, Bucket string
	Ssl                                                           bool
	// contains filtered or unexported fields
}

func NewMinIOUploader added in v1.10.34

func NewMinIOUploader(endpoint, accessKeyID, secretAccessKey, region, token, bucket string, ssl bool) (*MinIOUploader, error)

func (*MinIOUploader) Upload added in v1.9.36

func (l *MinIOUploader) Upload(ctx context.Context, object *Object, execution testkube.Execution) error

type MinioScraper

type MinioScraper struct {
	Endpoint, AccessKeyID, SecretAccessKey, Region, Token, Bucket string
	Ssl                                                           bool
}

MinioScraper manages getting artifacts from job pods

func NewMinioScraper

func NewMinioScraper(endpoint, accessKeyID, secretAccessKey, region, token, bucket string, ssl bool) *MinioScraper

NewMinioScraper returns a Minio implementation of the Scraper

func (MinioScraper) Scrape

func (s MinioScraper) Scrape(ctx context.Context, directories []string, execution testkube.Execution) error

Scrape gets artifacts from pod based on execution ID and directories list

type MockExtractor added in v1.9.23

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

MockExtractor is a mock of Extractor interface.

func NewMockExtractor added in v1.9.23

func NewMockExtractor(ctrl *gomock.Controller) *MockExtractor

NewMockExtractor creates a new mock instance.

func (*MockExtractor) EXPECT added in v1.9.23

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExtractor) Extract added in v1.9.23

func (m *MockExtractor) Extract(arg0 context.Context, arg1 ProcessFn) error

Extract mocks base method.

type MockExtractorMockRecorder added in v1.9.23

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

MockExtractorMockRecorder is the mock recorder for MockExtractor.

func (*MockExtractorMockRecorder) Extract added in v1.9.23

func (mr *MockExtractorMockRecorder) Extract(arg0, arg1 interface{}) *gomock.Call

Extract indicates an expected call of Extract.

type MockScraper added in v1.10.34

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

MockScraper is a mock of Scraper interface.

func NewMockScraper added in v1.10.34

func NewMockScraper(ctrl *gomock.Controller) *MockScraper

NewMockScraper creates a new mock instance.

func (*MockScraper) EXPECT added in v1.10.34

func (m *MockScraper) EXPECT() *MockScraperMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockScraper) Scrape added in v1.10.34

func (m *MockScraper) Scrape(arg0 context.Context, arg1 []string, arg2 testkube.Execution) error

Scrape mocks base method.

type MockScraperMockRecorder added in v1.10.34

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

MockScraperMockRecorder is the mock recorder for MockScraper.

func (*MockScraperMockRecorder) Scrape added in v1.10.34

func (mr *MockScraperMockRecorder) Scrape(arg0, arg1, arg2 interface{}) *gomock.Call

Scrape indicates an expected call of Scrape.

type MockUploader added in v1.9.23

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

MockUploader is a mock of Uploader interface.

func NewMockUploader added in v1.9.23

func NewMockUploader(ctrl *gomock.Controller) *MockUploader

NewMockUploader creates a new mock instance.

func (*MockUploader) EXPECT added in v1.9.23

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUploader) Upload added in v1.9.23

func (m *MockUploader) Upload(arg0 context.Context, arg1 *Object, arg2 map[string]interface{}) error

Upload mocks base method.

type MockUploaderMockRecorder added in v1.9.23

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

MockUploaderMockRecorder is the mock recorder for MockUploader.

func (*MockUploaderMockRecorder) Upload added in v1.9.23

func (mr *MockUploaderMockRecorder) Upload(arg0, arg1, arg2 interface{}) *gomock.Call

Upload indicates an expected call of Upload.

type Object added in v1.9.23

type Object struct {
	Name     string
	Size     int64
	Data     io.Reader
	DataType DataType
}

type ProcessFn added in v1.9.23

type ProcessFn func(ctx context.Context, object *Object) error

type RecursiveFilesystemExtractor added in v1.10.34

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

func NewRecursiveFilesystemExtractor added in v1.10.34

func NewRecursiveFilesystemExtractor(fs filesystem.FileSystem) *RecursiveFilesystemExtractor

func (*RecursiveFilesystemExtractor) Extract added in v1.10.34

func (e *RecursiveFilesystemExtractor) Extract(ctx context.Context, paths []string, process ProcessFn) error

type Scraper

type Scraper interface {
	// Scrape gets artifacts from the provided paths and the provided execution
	Scrape(ctx context.Context, paths []string, execution testkube.Execution) error
}

Scraper is responsible for collecting and persisting the execution artifacts

type Uploader added in v1.9.23

type Uploader interface {
	Upload(ctx context.Context, object *Object, execution testkube.Execution) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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