tools

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter struct {
	URL  string
	Msgs chan agent.State
	// contains filtered or unexported fields
}

Reporter represents a "fake" agent suitable to be used in tests.

func NewReporter

func NewReporter(checkID string) *Reporter

NewReporter creates a minimal http server that receives and sends to a channel the messages received by a check with a given checkID. Should be only used for test pourposes.

func (*Reporter) Stop

func (r *Reporter) Stop()

Stop the underlaying HTTPServer and closes the channel used to receive messages.

Jump to

Keyboard shortcuts

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