worker

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpClientNetHTTP   = "nethttp"
	HttpClientNetHTTP2  = "nethttp2"
	HttpClientNetHTTP3  = "nethttp3"
	HttpClientFastHTTP1 = "fasthttp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseCode

type ResponseCode int

type Stats

type Stats struct {
	CompletedReqs int64
	FailedReqs    int64
	Responses     *sync.Map
	Errors        *sync.Map
}

type TotalRequestsComplete

type TotalRequestsComplete int64

type Worker

type Worker interface {
	Run(wg *sync.WaitGroup)
	Stats() Stats
	ReqSize() int64
	RespSize() int64
}

func NewWorker

func NewWorker(config *http_clients.Config) (Worker, error)

type WorkerBase

type WorkerBase struct {
	CompletedReqs atomic.Int64
	FailedReqs    atomic.Int64
	// contains filtered or unexported fields
}

func (*WorkerBase) ReqSize

func (w *WorkerBase) ReqSize() int64

func (*WorkerBase) RespSize

func (w *WorkerBase) RespSize() int64

func (*WorkerBase) Stats

func (w *WorkerBase) Stats() Stats

type WorkerFixedReqs

type WorkerFixedReqs struct {
	*WorkerBase
}

func (*WorkerFixedReqs) Run

func (w *WorkerFixedReqs) Run(wg *sync.WaitGroup)

type WorkerFixedTime

type WorkerFixedTime struct {
	*WorkerBase
}

func (*WorkerFixedTime) Run

func (w *WorkerFixedTime) Run(wg *sync.WaitGroup)

type WorkerFixedTimeRequests

type WorkerFixedTimeRequests struct {
	*WorkerBase
}

func (*WorkerFixedTimeRequests) Run

Jump to

Keyboard shortcuts

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