insights

package
v0.0.0-...-4be01c1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoAdditionalActions = func([]core.Detector, dbconn.RwConn, core.Clock) error { return nil }

Functions

func NoDetectors

func NoDetectors(settings *insightsSettings.Settings, creator *creator, options core.Options) []core.Detector

func SettingsDetectors

func SettingsDetectors(settings *insightsSettings.Settings, creator *creator, options core.Options) []core.Detector

SettingsDetectors is a list of detectors that take some of their options from the settings (list is used for unit tests purposes)

Types

type Accessor

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

func NewAccessor

func NewAccessor(stateConn *dbconn.PooledPair) (*Accessor, error)

func (*Accessor) NotificationPolicy

func (c *Accessor) NotificationPolicy() notification.Policy

type DefaultNotificationPolicy

type DefaultNotificationPolicy struct {
}

func (DefaultNotificationPolicy) Reject

type Engine

type Engine struct {
	runner.CancellableRunner
	closers.Closers
	// contains filtered or unexported fields
}

func NewCustomEngine

func NewCustomEngine(
	metaReader *metadata.Reader,
	insightsAccessor *Accessor,
	fetcher core.Fetcher,
	notificationCenter *notification.Center,
	options core.Options,
	buildDetectors func(*insightsSettings.Settings, *creator, core.Options) []core.Detector,
	additionalActions func([]core.Detector, dbconn.RwConn, core.Clock) error,
) (*Engine, error)

func NewEngine

func NewEngine(
	metaReader *metadata.Reader,
	insightsAccessor *Accessor,
	fetcher core.Fetcher,
	notificationCenter *notification.Center,
	options core.Options,
) (*Engine, error)

func (*Engine) ArchiveInsight

func (e *Engine) ArchiveInsight(id int64)

func (*Engine) GenerateInsight

func (e *Engine) GenerateInsight(ctx context.Context, properties core.InsightProperties)

func (*Engine) GetCoreDetectors

func (e *Engine) GetCoreDetectors() []core.Detector

func (*Engine) ImportAnnouncer

func (e *Engine) ImportAnnouncer() announcer.ImportAnnouncer

func (*Engine) ProgressFetcher

func (e *Engine) ProgressFetcher() core.ProgressFetcher

func (*Engine) RateInsight

func (e *Engine) RateInsight(kind string, rating uint, clock timeutil.Clock) error

func (*Engine) UpdateCoreDetectorsFromSettings

func (e *Engine) UpdateCoreDetectorsFromSettings() error

Jump to

Keyboard shortcuts

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