scraper

package
v1.12.8 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 20 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, opts ...ArchiveFilesystemExtractorOpts) *ArchiveFilesystemExtractor

func (*ArchiveFilesystemExtractor) Extract added in v1.10.34

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

type ArchiveFilesystemExtractorOpts added in v1.10.41

type ArchiveFilesystemExtractorOpts func(*ArchiveFilesystemExtractor)

func GenerateTarballMetaFile added in v1.10.41

func GenerateTarballMetaFile() ArchiveFilesystemExtractorOpts

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 DataType = "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, cdeventsClient cloudevents.Client,
	clusterID, dashboardURI string) *ExtractLoadScraper

func (*ExtractLoadScraper) Close added in v1.10.40

func (s *ExtractLoadScraper) Close() error

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, notify NotifyFn) error
}

type FileStat added in v1.10.44

type FileStat struct {
	Name string `json:"name"`
	Size int64  `json:"size"`
}

type FilesMeta added in v1.10.44

type FilesMeta struct {
	// DataType is the type of data that is stored
	DataType DataType `json:"dataType"`
	// Files is a list of files that are stored and their original sizes
	Files []*FileStat `json:"files"`
	// Archive is the name of the archive file that contains all the files
	Archive string `json:"archive,omitempty"`
}

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) Close added in v1.10.40

func (l *MinIOUploader) Close() error

func (*MinIOUploader) Upload added in v1.9.36

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

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 []string, arg2 ProcessFn, arg3 NotifyFn) 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, arg2, arg3 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) Close added in v1.10.40

func (m *MockScraper) Close() error

Close mocks base method.

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) Close added in v1.10.40

func (mr *MockScraperMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

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) Close added in v1.10.40

func (m *MockUploader) Close() error

Close mocks base method.

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 testkube.Execution) 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) Close added in v1.10.40

func (mr *MockUploaderMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

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 NotifyFn added in v1.11.25

type NotifyFn func(ctx context.Context, path string) error

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, notify NotifyFn) 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
	Close() 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
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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