job

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterAct

func FilterAct(result *state.Result, verb string) *state.Result

FilterAct returns grouped hits from given act verb.

Types

type Job

type Job struct {
	Target string
	State  *state.Job
	// contains filtered or unexported fields
}

Job represents a scan job. Each target can have exactly one job.

func New

func New(target string, paths *Paths, timeout time.Duration, batchSz int, acters []acter.Acter, tasks []func(*state.Result) error, ticker bool) *Job

New returns a new job.

func (*Job) Acts

func (job *Job) Acts(result *state.Result)

Acts performs actions with a given result.

func (*Job) Start

func (job *Job) Start(ctx context.Context, skips *act.Skips, workers ...*worker.Worker)

Start starts a job.

func (*Job) Stop

func (job *Job) Stop()

Stop stops a job.

func (*Job) Tasks

func (job *Job) Tasks(result *state.Result)

Tasks performs tasks with a given result.

func (*Job) Walk

func (job *Job) Walk(skips *act.Skips, sz int) chan string

Walk traverses paths. File counting done here in single thread to avoid lock contention from workers handling it.

type Paths

type Paths struct {
	Files []string
	Dirs  []string
}

Paths represents scan paths.

Jump to

Keyboard shortcuts

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