analyzer

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	DB        *sql.DB
	Connector *githubx.Connector
	Logger    logging.Logger
}

Analyzer performs static analysis on repositories and stores the results in the database.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(ctx context.Context, repoID int64) error

Analyze analyzes the repo with the given ID.

type Orchestrator

type Orchestrator struct {
	Analyzer *Analyzer
	Remover  *Remover
	// contains filtered or unexported fields
}

Orchestrator orchestrates the analysis and removal of repositories.

func (*Orchestrator) EnqueueAnalyis

func (o *Orchestrator) EnqueueAnalyis(ctx context.Context, repoID int64) error

EnqueueAnalyis enqueues a repository for analysis.

func (*Orchestrator) EnqueueRemoval

func (o *Orchestrator) EnqueueRemoval(ctx context.Context, repoID int64) error

EnqueueRemoval enqueues a repository for removal.

func (*Orchestrator) Run

func (o *Orchestrator) Run(ctx context.Context) error

Run performs analysis and removal until ctx is cancelled or an error occurs.

type Remover

type Remover struct {
	DB     *sql.DB
	Logger logging.Logger
}

Remover removes information about repositories from the database.

func (*Remover) Remove

func (rm *Remover) Remove(ctx context.Context, repoID int64) error

Remove removes all analysis results from the given repository.

Jump to

Keyboard shortcuts

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