processing

package
v0.0.0-...-1bd0b79 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package processing contains the high-level workflows an actions that are used to analyze Bazel invocations.

This package what wires together the backend processes. This where orchestration and integration happens between the filesystem, summarization functions and database.

This package is responsible for detecting, processing & storing new data. It is not responsible for queries against data that has already been stored.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobArchiver

type BlobArchiver interface {
	ArchiveBlob(ctx context.Context, blobURI detectors.BlobURI) ent.Blob
}

BlobArchiver A blob arhiver interace.

type BlobMultiArchiver

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

BlobMultiArchiver A blob Multi Archiver.

func NewBlobMultiArchiver

func NewBlobMultiArchiver() BlobMultiArchiver

NewBlobMultiArchiver A blob multi archiver constructor.

func (*BlobMultiArchiver) ArchiveBlobs

func (ma *BlobMultiArchiver) ArchiveBlobs(ctx context.Context, blobURIs []detectors.BlobURI) ([]ent.Blob, error)

ArchiveBlobs Archives blobs.

func (*BlobMultiArchiver) RegisterArchiver

func (ma *BlobMultiArchiver) RegisterArchiver(schema string, archiver BlobArchiver)

RegisterArchiver Regsters an archiver.

type LocalFileArchiver

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

LocalFileArchiver Load file archiver struct.

func NewLocalFileArchiver

func NewLocalFileArchiver(blobArchiveFolder string) LocalFileArchiver

NewLocalFileArchiver Constrctor for file archiver.

func (LocalFileArchiver) ArchiveBlob

func (lfa LocalFileArchiver) ArchiveBlob(_ context.Context, blobURI detectors.BlobURI) ent.Blob

ArchiveBlob Archive Blob function.

type SaveActor

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

SaveActor ...SaveActor The save actor struct with the db client and a blob archiver.

func (SaveActor) SaveSummary

func (act SaveActor) SaveSummary(ctx context.Context, summary *summary.Summary) (*ent.BazelInvocation, error)

SaveSummary saves an invocation summary to the database.

type SummarizeActor

type SummarizeActor struct{}

SummarizeActor struct.

func (SummarizeActor) Summarize

func (SummarizeActor) Summarize(ctx context.Context, eventFileURL string) (*summary.Summary, error)

Summarize function.

type Workflow

type Workflow struct {
	SummarizeActor
	SaveActor
}

Workflow struct.

func New

func New(db *ent.Client, blobArchiver BlobMultiArchiver) *Workflow

New Worflow constructor

func (Workflow) ProcessFile

func (w Workflow) ProcessFile(ctx context.Context, file string) (*ent.BazelInvocation, error)

ProcessFile function.

Jump to

Keyboard shortcuts

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