Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultInterval = 5 * time.Second DefaultMaxCount = 200 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultGenerator ¶
type DefaultGenerator struct { Handler Handler Interval time.Duration MaxCount int ProcessedCount int // contains filtered or unexported fields }
Default implementation
func (*DefaultGenerator) Errors ¶
func (d *DefaultGenerator) Errors() chan error
func (*DefaultGenerator) Generate ¶
func (d *DefaultGenerator) Generate()
func (*DefaultGenerator) Stop ¶
func (d *DefaultGenerator) Stop() bool
type Generator ¶
Generator interface if there is a need
func NewBuilder ¶
NewBuilder builds a cli usage generator, parsing particular flags (constant, max, interval) and building configuration while injecting the command (CMD) specific handler for generating events
This exists to prevent duplication across the various event generator cli commands that will merely implement a unique handler
func NewWitConfig ¶
Return a new Generator returning interface with an injected handler
func NewWithHandler ¶
Return a new Generator returning interface with an injected handler
Click to show internal directories.
Click to hide internal directories.