extractor

package
v0.0.0-...-f330bf7 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Configuration of feature extractors supported by the scheduler.

Functions

This section is empty.

Types

type FeatureExtractorMonitor

type FeatureExtractorMonitor[F plugins.FeatureExtractor] struct {
	// The wrapped feature extractor to monitor.
	FeatureExtractor F
	// contains filtered or unexported fields
}

Wrapper for a feature extraction step that monitors the step's execution.

func (FeatureExtractorMonitor[F]) Extract

func (m FeatureExtractorMonitor[F]) Extract() ([]plugins.Feature, error)

Run the wrapped feature extractor and measure the time it takes.

func (FeatureExtractorMonitor[F]) GetName

func (m FeatureExtractorMonitor[F]) GetName() string

Get the name of the wrapped feature extractor.

func (FeatureExtractorMonitor[F]) Init

Initialize the wrapped feature extractor with the database and options.

func (FeatureExtractorMonitor[F]) MarkAsUpdated

func (m FeatureExtractorMonitor[F]) MarkAsUpdated()

func (FeatureExtractorMonitor[F]) NeedsUpdate

func (m FeatureExtractorMonitor[F]) NeedsUpdate() bool

func (FeatureExtractorMonitor[F]) NextPossibleExecution

func (m FeatureExtractorMonitor[F]) NextPossibleExecution() time.Time

func (FeatureExtractorMonitor[F]) NotifySkip

func (m FeatureExtractorMonitor[F]) NotifySkip()

func (FeatureExtractorMonitor[F]) Triggers

func (m FeatureExtractorMonitor[F]) Triggers() []string

Get the message topics that trigger a re-execution of the wrapped feature extractor.

type FeatureExtractorPipeline

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

Pipeline that contains multiple feature extractors and executes them.

func NewPipeline

func NewPipeline(config conf.ExtractorConfig, database db.DB, m Monitor, mqttClient mqtt.Client) FeatureExtractorPipeline

Create a new feature extractor pipeline with extractors contained in the configuration.

func (*FeatureExtractorPipeline) ExtractOnTrigger

func (p *FeatureExtractorPipeline) ExtractOnTrigger()

Extract features from the data sources when triggered by MQTT messages. If mqtt is disabled, this function does nothing.

func (*FeatureExtractorPipeline) Init

func (p *FeatureExtractorPipeline) Init(supportedExtractors []plugins.FeatureExtractor)

Initialize the feature extractors in the pipeline.

type FeatureExtractorTelemetryPublisher

type FeatureExtractorTelemetryPublisher struct {
	// The wrapped extractor that provides the telemetry data.
	FeatureExtractor plugins.FeatureExtractor
	// The MQTT topic to publish telemetry data.
	// If not set, the extractor will not publish telemetry data.
	MQTTTopic string
	// The mqtt client to publish telemetry data.
	MQTTClient mqtt.Client
}

func (FeatureExtractorTelemetryPublisher) Extract

Run the wrapped feature extractor and publish telemetry data if needed.

func (FeatureExtractorTelemetryPublisher) GetName

Get the name of the wrapped feature extractor.

func (FeatureExtractorTelemetryPublisher) Init

Initialize the wrapped feature extractor with the database and options.

func (FeatureExtractorTelemetryPublisher) MarkAsUpdated

func (p FeatureExtractorTelemetryPublisher) MarkAsUpdated()

func (FeatureExtractorTelemetryPublisher) NeedsUpdate

func (p FeatureExtractorTelemetryPublisher) NeedsUpdate() bool

func (FeatureExtractorTelemetryPublisher) NextPossibleExecution

func (p FeatureExtractorTelemetryPublisher) NextPossibleExecution() time.Time

func (FeatureExtractorTelemetryPublisher) NotifySkip

func (p FeatureExtractorTelemetryPublisher) NotifySkip()

func (FeatureExtractorTelemetryPublisher) Triggers

Get the message topics that trigger a re-execution of the wrapped feature extractor.

type Monitor

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

Collection of Prometheus metrics to monitor feature extraction.

func NewPipelineMonitor

func NewPipelineMonitor(registry *monitoring.Registry) Monitor

Create a new feature extraction monitor and register the necessary Prometheus metrics.

Directories

Path Synopsis
kvm
sap

Jump to

Keyboard shortcuts

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