emitter

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseProducers

func CloseProducers(es map[string][]Emitter)

func DoLoop

func DoLoop(es []Emitter)

func WriteStats

func WriteStats()

Types

type Emitter

type Emitter struct {
	Name             string        `mapstructure:"name"`
	Locale           string        `mapstructure:"locale"`
	Num              int           `mapstructure:"num"`
	Frequency        time.Duration `mapstructure:"frequency"`
	Duration         time.Duration `mapstructure:"duration"`
	Preload          int           `mapstructure:"preload"`
	ValueTemplate    string        `mapstructure:"valueTemplate"`
	EmbeddedTemplate string        `mapstructure:"embeddedTemplate"`
	KeyTemplate      string        `mapstructure:"keyTemplate"`
	OutputTemplate   string        `mapstructure:"outputTemplate"`
	Output           string        `mapstructure:"output"`
	Topic            string        `mapstructure:"topic"`
	Kcat             bool          `mapstructure:"kcat"`
	Oneline          bool          `mapstructure:"oneline"`
	Csv              string        `mapstructure:"csv"`
	Producer         Producer
	KTpl             tpl.Tpl
	VTpl             tpl.Tpl
}

func Initialize

func Initialize(emitterNames []string, es map[string][]Emitter, dryrun bool) []Emitter

func InitializeEmitters

func InitializeEmitters(emitters []Emitter, dryrun bool, emittersToRun []Emitter) []Emitter

func (*Emitter) Initialize

func (e *Emitter) Initialize(conf configuration.GlobalConfiguration)

func (*Emitter) Run

func (e *Emitter) Run(num int, o any)

type Producer

type Producer interface {
	Produce(k []byte, v []byte, o any)
	io.Closer
}

type Throughput

type Throughput float64

func ParseThroughput

func ParseThroughput(input string) (Throughput, error)

Jump to

Keyboard shortcuts

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