metric_gen

package
v0.0.0-...-1e14d63 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TCPPlacement
	HTTPPlacement
	NONEPlacement
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UniquePercent       int
	DimensionSize       int
	MetricSetsPerMinute int
}

type Field

type Field struct {
	Name                    string
	Size                    int
	Possibilities           []string
	SimpleTestPossibilities []string

	Type      int
	Placement int
}

type Generator

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

func NewGenerator

func NewGenerator(cfg Config, options ...Option) (*Generator, error)

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context, output chan *Message) error

type Message

type Message struct {
	Message    string
	MetricSets int
}

type Option

type Option func(generator *Generator)

func WithFixedMetricSets

func WithFixedMetricSets(set ...string) Option

func WithSimpleSet

func WithSimpleSet(simple bool) Option

type Pusher

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

func NewPusher

func NewPusher(addr string) *Pusher

func (*Pusher) Close

func (p *Pusher) Close()

func (*Pusher) Connect

func (p *Pusher) Connect() error

func (*Pusher) PushToSocket

func (p *Pusher) PushToSocket(message []byte, startFrom int, timeout time.Duration) (int, error)

Jump to

Keyboard shortcuts

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