worker

package
v0.0.0-...-e65fb60 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package worker implements the worker related activities like starting TCP/UDP/HTTP client/server and collecting the metric output to be returned to the controller when requested.

Index

Constants

View Source
const (
	ProtocolTCP  = "TCP"
	ProtocolUDP  = "UDP"
	ProtocolHTTP = "HTTP"
)

Protocols supported.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

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

Worker holds data required for facilitating measurement.

func NewWorker

func NewWorker() *Worker

func (*Worker) Handler

func (w *Worker) Handler(rw http.ResponseWriter, _ *http.Request)

Handler handles http requests for http measurements.

func (*Worker) Start

func (w *Worker) Start(extraArguments map[string]*string)

Start starts the worker.

func (*Worker) StartHTTPServer

func (w *Worker) StartHTTPServer()

StartHTTPServer starts an http server for http measurements.

Jump to

Keyboard shortcuts

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