Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentProcessor ¶
type ConcurrentProcessor struct {
// contains filtered or unexported fields
}
ConcurrentProcessor handles concurrent workflow analysis
func NewConcurrentProcessor ¶
func NewConcurrentProcessor(config *ProcessorConfig) *ConcurrentProcessor
NewConcurrentProcessor creates a new concurrent processor
func (*ConcurrentProcessor) GetStats ¶
func (cp *ConcurrentProcessor) GetStats() (completed, total int, config *ProcessorConfig)
GetStats returns processing statistics
func (*ConcurrentProcessor) ProcessWorkflows ¶
func (cp *ConcurrentProcessor) ProcessWorkflows( ctx context.Context, workflowFiles []parser.WorkflowFile, standardRules []rules.Rule, policyEngine *policies.PolicyEngine, cfg *config.Config, ) ([]rules.Finding, error)
ProcessWorkflows processes multiple workflows concurrently
type ProcessorConfig ¶
type ProcessorConfig struct {
// MaxWorkers defines the maximum number of concurrent workers
// If 0, uses number of CPU cores
MaxWorkers int
// Timeout for processing a single workflow file
WorkflowTimeout time.Duration
// Timeout for the entire analysis operation
TotalTimeout time.Duration
// Enable progress reporting
ShowProgress bool
// Buffer size for worker channels
BufferSize int
}
ProcessorConfig contains configuration for concurrent processing
func DefaultProcessorConfig ¶
func DefaultProcessorConfig() *ProcessorConfig
DefaultProcessorConfig returns a default configuration
type ProgressReporter ¶
ProgressReporter handles progress reporting during concurrent processing
func NewProgressReporter ¶
func NewProgressReporter(total int, showProgress bool) *ProgressReporter
NewProgressReporter creates a new progress reporter
func (*ProgressReporter) GetProgress ¶
func (pr *ProgressReporter) GetProgress() (completed, total int)
GetProgress returns current progress information
func (*ProgressReporter) Update ¶
func (pr *ProgressReporter) Update(workflowName string)
Update increments the completed count and reports progress
type WorkflowJob ¶
type WorkflowJob struct {
Workflow parser.WorkflowFile
StandardRules []rules.Rule
PolicyEngine *policies.PolicyEngine
Config *config.Config
}
WorkflowJob represents a single workflow analysis job
Click to show internal directories.
Click to hide internal directories.