progress

package
v3.2.7-fix Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package progress implements progress display mechanism with very simple command line statistics printing on runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress

type Progress interface {
	// Stop stops the progress recorder.
	Stop()
	// Init inits the progress bar with initial details for scan
	Init(hostCount int64, rulesCount int, requestCount int64)
	// AddToTotal adds a value to the total request count
	AddToTotal(delta int64)
	// IncrementRequests increments the requests counter by 1.
	IncrementRequests()
	// SetRequests sets the counter by incrementing it with a delta
	SetRequests(count uint64)
	// IncrementMatched increments the matched counter by 1.
	IncrementMatched()
	// IncrementErrorsBy increments the error counter by count.
	IncrementErrorsBy(count int64)
	// IncrementFailedRequestsBy increments the number of requests counter by count
	// along with errors.
	IncrementFailedRequestsBy(count int64)
}

Progress is an interface implemented by nuclei progress display driver.

func NewStatsTicker

func NewStatsTicker(duration int, active, outputJSON, cloud bool, port int) (Progress, error)

NewStatsTicker creates and returns a new progress tracking object.

type StatsTicker

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

StatsTicker is a progress instance for showing program stats

func (*StatsTicker) AddToTotal

func (p *StatsTicker) AddToTotal(delta int64)

AddToTotal adds a value to the total request count

func (*StatsTicker) IncrementErrorsBy

func (p *StatsTicker) IncrementErrorsBy(count int64)

IncrementErrorsBy increments the error counter by count.

func (*StatsTicker) IncrementFailedRequestsBy

func (p *StatsTicker) IncrementFailedRequestsBy(count int64)

IncrementFailedRequestsBy increments the number of requests counter by count along with errors.

func (*StatsTicker) IncrementMatched

func (p *StatsTicker) IncrementMatched()

IncrementMatched increments the matched counter by 1.

func (*StatsTicker) IncrementRequests

func (p *StatsTicker) IncrementRequests()

IncrementRequests increments the requests counter by 1.

func (*StatsTicker) Init

func (p *StatsTicker) Init(hostCount int64, rulesCount int, requestCount int64)

Init initializes the progress display mechanism by setting counters, etc.

func (*StatsTicker) SetRequests

func (p *StatsTicker) SetRequests(count uint64)

SetRequests sets the counter by incrementing it with a delta

func (*StatsTicker) Stop

func (p *StatsTicker) Stop()

Stop stops the progress bar execution

Jump to

Keyboard shortcuts

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