progress

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: AGPL-3.0, AGPL-3.0-only Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestFlush

func RequestFlush(out chan<- struct{})

Types

type Controller

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

func Start

func Start(ctx context.Context, out io.Writer, snapshot snapshotFunc, pause *PauseController, interval time.Duration, opts Options) *Controller

func (*Controller) Found

func (c *Controller) Found(result string)

func (*Controller) SetPauseState

func (c *Controller) SetPauseState(state PauseState)

func (*Controller) Stop

func (c *Controller) Stop()

type Options

type Options struct {
	Protocol config.Protocol
	Ports    []uint16
	Config   config.Config
	Cancel   context.CancelCauseFunc
	StopErr  error
	Enabled  bool
}

type PauseController

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

func NewPauseController

func NewPauseController() *PauseController

func (*PauseController) CompleteJob

func (c *PauseController) CompleteJob()

func (*PauseController) FinishIP

func (c *PauseController) FinishIP()

func (*PauseController) SetStateNotifier

func (c *PauseController) SetStateNotifier(notifier func(PauseState))

func (*PauseController) State

func (c *PauseController) State() PauseState

func (*PauseController) Toggle

func (c *PauseController) Toggle()

func (*PauseController) TrackJob

func (c *PauseController) TrackJob()

func (*PauseController) WaitUntilRunnable

func (c *PauseController) WaitUntilRunnable(ctx context.Context) error

type PauseState

type PauseState string
const (
	PauseRunning PauseState = "running"
	PausePending PauseState = "pending-pause"
	PausePaused  PauseState = "paused"
)

type Snapshot

type Snapshot struct {
	TotalEndpoints uint64
	Scanned        uint64
	Open           uint64
	Probed         uint64
	Valid          uint64
	Elapsed        time.Duration
	Rate           float64
}

Jump to

Keyboard shortcuts

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