tasks

package
v0.0.0-...-226fd1e Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScanContext

type ScanContext struct {
	Res           chan error
	StopTriggered atomic.Bool
	IsAlive       atomic.Bool
	Context       context.Context
	Cancel        context.CancelFunc
}

func StartStatusReporter

func StartStatusReporter(
	scanId string,
	sendScanStatus func(ScanStatus) error,
	sv StatusValues,
	threshold time.Duration) (chan error, *ScanContext)

func (*ScanContext) Checkpoint

func (sc *ScanContext) Checkpoint(stage string) error

type ScanStatus

type ScanStatus struct {
	ScanId      string `json:"scan_id,omitempty"`
	ScanStatus  string `json:"scan_status,omitempty"`
	ScanMessage string `json:"scan_message,omitempty"`
}

type StatusValues

type StatusValues struct {
	IN_PROGRESS string
	CANCELLED   string
	FAILED      string
	SUCCESS     string
}

Jump to

Keyboard shortcuts

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