loadgen

package
v0.0.0-...-0f2ba6d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIncCollector

func NewIncCollector(nmetrics, nlabels int) *incCollector

func NewRandCyclicCollector

func NewRandCyclicCollector(nmetrics, nlabels, maxvalue int) *randCyclicCollector

func NewReplayHandler

func NewReplayHandler(e HttpExporter) *replayHandler

func NewStaticCollector

func NewStaticCollector(nmetrics, nlabels int) *staticCollector

Types

type Exporter

type Exporter interface {
	Sum() (int, error)
}

type HttpExporter

type HttpExporter interface {
	http.Handler
	Exporter
}

func NewHttpExporter

func NewHttpExporter(mg MetricsGenerator) HttpExporter

type InstanceSum

type InstanceSum struct {
	Instance string
	Sum      int
}

type LoadExporter

type LoadExporter interface {
	AddTarget(port int, job string, exporter Exporter) error
	Stop() ([]InstanceSum, error)
}

type LoadExporterInternal

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

func NewLoadExporterInternal

func NewLoadExporterInternal(ctx context.Context, sdcfgdir string) *LoadExporterInternal

func (*LoadExporterInternal) AddTarget

func (lei *LoadExporterInternal) AddTarget(port int, job string, exporter Exporter) error

func (*LoadExporterInternal) Stop

func (lei *LoadExporterInternal) Stop() ([]InstanceSum, error)

type MetricsGenerator

type MetricsGenerator interface {
	prometheus.Collector
	Sum() (int, error)
}

Jump to

Keyboard shortcuts

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