processor

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package processor handles the processing of tool installations and management.

Index

Constants

This section is empty.

Variables

View Source
var ErrToolsFailedToInstall = errors.New("tools failed to install")

ErrToolsFailedToInstall is returned when one or more tools failed to install.

Functions

This section is empty.

Types

type ConcurrencyManager

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

ConcurrencyManager manages concurrent execution of tool processing.

type DefaultResultHandler

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

DefaultResultHandler is the default implementation of ResultHandler.

func (*DefaultResultHandler) HandleResult

func (h *DefaultResultHandler) HandleResult(result ToolResult)

HandleResult processes the result of a tool operation.

func (*DefaultResultHandler) HasErrors

func (h *DefaultResultHandler) HasErrors() bool

HasErrors returns true if any tools failed to install.

type ResultHandler

type ResultHandler interface {
	HandleResult(result ToolResult)
	HasErrors() bool
}

ResultHandler handles the results of tool processing.

type ToolProcessor

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

ToolProcessor processes tools with concurrency support.

func New

func New(toolsList tools.Tools, defaults tools.Defaults, cfg config.Config, log *logger.Logger) *ToolProcessor

New creates a new ToolProcessor.

func (*ToolProcessor) Process

func (tp *ToolProcessor) Process(tags, withoutTags []string) error

Process starts processing tools with the given tags.

type ToolResult

type ToolResult struct {
	Tool  *tools.Tool
	Found file.File
	Err   error
	Msg   string
}

ToolResult holds the result of processing a tool.

Jump to

Keyboard shortcuts

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