worker

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

File: internal/worker/worker.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HumanoidInterface

type HumanoidInterface interface {
	MoveTo(ctx context.Context, selector string, opts *humanoid.InteractionOptions) error
	IntelligentClick(ctx context.Context, selector string, opts *humanoid.InteractionOptions) error
	Type(ctx context.Context, selector, text string, opts *humanoid.InteractionOptions) error
	DragAndDrop(ctx context.Context, startSelector, endSelector string, opts *humanoid.InteractionOptions) error
	CognitivePause(ctx context.Context, meanScale, stdDevScale float64) error
}

HumanoidInterface defines the methods that a humanoid instance must implement.

type MonolithicWorker

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

MonolithicWorker processes tasks in-process. It serves as a central dispatcher, routing analysis tasks to the appropriate, specialized adapters based on the task type.

func NewMonolithicWorker

func NewMonolithicWorker(
	cfg config.Interface,
	logger *zap.Logger,
	globalCtx *core.GlobalContext,
	opts ...Option,
) (*MonolithicWorker, error)

NewMonolithicWorker initializes and returns a new worker instance.

func (*MonolithicWorker) GlobalCtx

func (w *MonolithicWorker) GlobalCtx() *core.GlobalContext

GlobalCtx provides safe, read-only access to the worker's global context.

func (*MonolithicWorker) ProcessTask

func (w *MonolithicWorker) ProcessTask(ctx context.Context, analysisCtx *core.AnalysisContext) error

ProcessTask executes a single analysis task.

type Option

type Option func(*MonolithicWorker)

Option is a function that configures a MonolithicWorker.

func WithAnalyzers

func WithAnalyzers(analyzers core.AdapterRegistry) Option

WithAnalyzers provides a way to inject a custom set of analyzers. MODIFIED: Use the centralized type definition

Directories

Path Synopsis
internal/worker/adapters/ato_adapter.go
internal/worker/adapters/ato_adapter.go

Jump to

Keyboard shortcuts

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