Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvgSpamMetricsCaller ¶
func AvgSpamMetricsCaller(handler interface{}, params ...interface{})
AvgSpamMetricsCaller is used to signal new AvgSpamMetrics.
func SpamStatsCaller ¶
func SpamStatsCaller(handler interface{}, params ...interface{})
SpamStatsCaller is used to signal new SpamStats.
Types ¶
type AvgSpamMetrics ¶
type AvgSpamMetrics struct { NewMessages uint32 `json:"newMsgs"` AverageMessagesPerSecond float32 `json:"avgMsgs"` }
AvgSpamMetrics are average metrics of the created spam.
type SendMessageFunc ¶ added in v1.0.0
SendMessageFunc is a function which sends a message to the network.
type Spammer ¶
type Spammer struct {
// contains filtered or unexported fields
}
Spammer is used to issue messages to the IOTA network to create load on the tangle.
func New ¶
func New(networkID uint64, message string, index string, indexSemiLazy string, tipselFunc SpammerTipselFunc, powHandler *pow.Handler, sendMessageFunc SendMessageFunc, serverMetrics *metrics.ServerMetrics) *Spammer
New creates a new spammer instance.
type SpammerEvents ¶
type SpammerEvents struct { // Fired when a single spam message is issued. SpamPerformed *events.Event // Fired when average spam metrics were updated by the worker. AvgSpamMetricsUpdated *events.Event }
SpammerEvents are the events issued by the spammer.
type SpammerTipselFunc ¶
type SpammerTipselFunc = func() (isSemiLazy bool, tips hornet.MessageIDs, err error)
SpammerTipselFunc selects tips for the spammer.
Click to show internal directories.
Click to hide internal directories.