spammer

package
v0.8.18 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0, BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IssuePayloadFunc

type IssuePayloadFunc = func(payload payload.Payload, parentsCount ...int) (*tangle.Message, error)

IssuePayloadFunc is a function which issues a payload.

type Spammer

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

Spammer spams messages with a static data payload.

func New

func New(issuePayloadFunc IssuePayloadFunc, log *logger.Logger) *Spammer

New creates a new spammer.

func (*Spammer) Shutdown

func (s *Spammer) Shutdown()

Shutdown shuts down the spammer.

func (*Spammer) Start

func (s *Spammer) Start(rate int, timeUnit time.Duration, imif string)

Start starts the spammer to spam with the given messages per time unit, according to a inter message issuing function (IMIF)

Jump to

Keyboard shortcuts

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