loadgenerator

package
v0.0.0-...-73dc979 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(configFile *string, threads int, signals chan os.Signal)

Run start entry for generator

Types

type Postgres

type Postgres struct {
	DSN     string
	CTX     context.Context
	DBPool  *pgxpool.Pool
	Threads int
	Mutex   *sync.Mutex
	Ticker  *time.Ticker
	Master  string
	// contains filtered or unexported fields
}

Postgres is the main structure for each server

func NewPG

func NewPG(ctx context.Context, server string, wg *sync.WaitGroup, threads int) *Postgres

NewPG create new Postgres server instance

func (*Postgres) Start

func (p *Postgres) Start()

Start create Postgres.Threads amount of threads

func (*Postgres) StringGenerator

func (p *Postgres) StringGenerator(n int) interface{}

StringGenerator generate new random string for inserts

Jump to

Keyboard shortcuts

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