scraper

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 15 Imported by: 8

Documentation

Overview

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

func ExtractMinIOUploaderMeta added in v1.9.36

func ExtractMinIOUploaderMeta(execution testkube.Execution) map[string]any

Types

type ELScraper added in v1.9.36

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

func NewELScraper added in v1.9.36

func NewELScraper(extractor Extractor, loader Uploader) *ELScraper

func (*ELScraper) Scrape added in v1.9.36

func (s *ELScraper) Scrape(ctx context.Context, meta map[string]any) error

type Extractor added in v1.9.23

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

type FilesystemExtractor added in v1.9.23

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

func NewFilesystemExtractor added in v1.9.23

func NewFilesystemExtractor(dirs []string, fs filesystem.FileSystem) *FilesystemExtractor

func (*FilesystemExtractor) Extract added in v1.9.23

func (e *FilesystemExtractor) Extract(ctx context.Context, process ProcessFn) error

type MinIOUploader added in v1.9.36

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

func NewMinIOLoader added in v1.9.23

func NewMinIOLoader(endpoint, accessKeyID, secretAccessKey, location, token, bucket string, ssl bool) (*MinIOUploader, error)

func (*MinIOUploader) Upload added in v1.9.36

func (l *MinIOUploader) Upload(ctx context.Context, object *Object, meta map[string]any) error

type MinioScraper

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

MinioScraper manages getting artifacts from job pods

func NewMinioScraper

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

NewMinioScraper returns a Minio implementation of the Scraper

func (MinioScraper) Scrape

func (s MinioScraper) Scrape(id string, directories []string) 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 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
}

type ProcessFn added in v1.9.23

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

type Scraper

type Scraper interface {
	// Scrape gets artifacts from the directories present in the execution with executionID
	Scrape(executionID string, directories []string) error
}

Scraper is responsible for collecting and persisting the necessary artifacts

type Uploader added in v1.9.23

type Uploader interface {
	Upload(ctx context.Context, object *Object, meta map[string]any) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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