spammer

package
v0.5.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCPUPercentageUnknown = errors.New("CPU percentage unknown")
)
View Source
var Events = pluginEvents{
	SpamPerformed:         events.NewEvent(SpamStatsCaller),
	AvgSpamMetricsUpdated: events.NewEvent(AvgSpamMetricsCaller),
}
View Source
var (
	PLUGIN = node.NewPlugin("Spammer", node.Disabled, configure, run)
)

Functions

func AvgSpamMetricsCaller added in v0.4.0

func AvgSpamMetricsCaller(handler interface{}, params ...interface{})

AvgSpamMetricsCaller is used to signal new AvgSpamMetrics.

func SpamStatsCaller added in v0.4.0

func SpamStatsCaller(handler interface{}, params ...interface{})

SpamStatsCaller is used to signal new SpamStats.

Types

type AvgSpamMetrics added in v0.4.0

type AvgSpamMetrics struct {
	New              uint32  `json:"new"`
	AveragePerSecond float32 `json:"avg"`
}

AvgSpamMetrics are average metrics of the created spam.

type SpamStats added in v0.4.0

type SpamStats struct {
	GTTA float32 `json:"gtta"`
	POW  float32 `json:"pow"`
}

SpamStats are stats for a single spam transaction/bundle.

Jump to

Keyboard shortcuts

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