processor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package processor handles the processing of resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BatchSize int
}

Config holds configuration values for the Processor.

type Processor

type Processor struct {
	Config  Config
	Storage storage.Storage
	// contains filtered or unexported fields
}

Processor manages the processing of resources from various sources.

func NewProcessor

func NewProcessor(config Config, storage storage.Storage, scanners []scanner.Scanner, logger *logrus.Logger, metrics *metrics.Collector) Processor

NewProcessor initializes a new Processor instance.

func (*Processor) Process

func (p *Processor) Process(resourceChan chan resource.Resource, sch scheduler.Scheduler) error

Process initiates resource processing. It starts scanners for all sources and processes resources in batches.

Jump to

Keyboard shortcuts

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