localworker

package
v2.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkLoop

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

WorkLoop is a version of worker.WorkLoop that reads data from a local file, rather than a from a pubsub feed populated by the Scorecard controller.

func FromConfig

func FromConfig(logger *zap.Logger, w worker.Worker) (*WorkLoop, error)

FromConfig returns a new local WorkLoop instance using the config values read in.

Apart from the usual config values for the data bucket, raw data bucket, and shard size, the criticality score config values "local-url-data-file" and "local-state-file" are also used.

func (*WorkLoop) Run

func (l *WorkLoop) Run() error

Run iterates through the repositories in batches, calling the supplied worker.Process method for each batch.

Jump to

Keyboard shortcuts

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