tracker

package
v1.18.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRepositories

func GetRepositories(
	ctx context.Context,
	cfg *viper.Viper,
	rm hub.RepositoryManager,
) ([]*hub.Repository, error)

GetRepositories gets the repositories the tracker will process based on the configuration provided:

  • If a list of repositories names, those will be the repositories returned provided they are found.
  • If a list of repositories kinds is provided, all repositories of those kinds will be returned.
  • Otherwise, all the repositories will be returned.

NOTE: disabled repositories will be filtered out.

func SetupSource added in v0.14.0

func SetupSource(i *hub.TrackerSourceInput) hub.TrackerSource

SetupSource returns the tracker source that should be used for the repository provided.

Types

type PackageCategoryClassifierML added in v1.13.0

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

PackageCategoryClassifierML classifies packages by category using a ML model.

func NewPackageCategoryClassifierML added in v1.13.0

func NewPackageCategoryClassifierML(modelPath string) *PackageCategoryClassifierML

NewPackageCategoryClassifierML creates a new CategoryClassifier instance.

func (*PackageCategoryClassifierML) Predict added in v1.13.0

Predict returns the predicted category according to the model for the package provided. The prediction is based on the package's keywords.

type PackageCategoryClassifierMock added in v1.13.0

type PackageCategoryClassifierMock struct {
	mock.Mock
}

PackageCategoryClassifierMock is a mock implementation of the PackageCategoryClassifier interface.

func (*PackageCategoryClassifierMock) Predict added in v1.13.0

Predict implements the PackageCategoryClassifier interface.

type Tracker added in v0.4.0

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

Tracker is in charge of tracking the packages available in the repository provided, registering and unregistering them as needed.

func New added in v0.4.0

func New(svc *hub.TrackerServices, r *hub.Repository, logger zerolog.Logger) *Tracker

New creates a new Tracker instance.

func (*Tracker) Run added in v0.14.0

func (t *Tracker) Run() error

Run initializes the tracking of the repository provided.

Directories

Path Synopsis
olm

Jump to

Keyboard shortcuts

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