measurement

package
v0.0.0-...-15815b4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMeasurement

type BaseMeasurement interface {
	Name() string
	PerformMeasurement() (string, string, string, bool)
	SummaryPhrase() string
}

func NewAppPushability

func NewAppPushability(
	pushAndDeleteAppCommandGeneratorFunc func() []cmdStartWaiter.CmdStartWaiter,
	runner cmdRunner.CmdRunner,
	runnerOutBuf *bytes.Buffer,
	runnerErrBuf *bytes.Buffer,
) BaseMeasurement

func NewHTTPAvailability

func NewHTTPAvailability(url string, client *http.Client) BaseMeasurement

func NewRecentLogs

func NewRecentLogs(
	recentLogsCommandGeneratorFunc func() []cmdStartWaiter.CmdStartWaiter,
	runner cmdRunner.CmdRunner,
	runnerOutBuf *bytes.Buffer,
	runnerErrBuf *bytes.Buffer,
	appLogValidator appLogValidator.AppLogValidator,
) BaseMeasurement

func NewStatsAvailability

func NewStatsAvailability(
	statsAvailabilityCommandGeneratorFunc func() []cmdStartWaiter.CmdStartWaiter,
	runner cmdRunner.CmdRunner,
	runnerOutBuf *bytes.Buffer,
	runnerErrBuf *bytes.Buffer,
) BaseMeasurement

func NewStreamingLogs

func NewStreamingLogs(
	streamLogsCommandGeneratorFunc func() (context.Context, context.CancelFunc, []cmdStartWaiter.CmdStartWaiter),
	runner cmdRunner.CmdRunner,
	runnerOutBuf *bytes.Buffer,
	runnerErrBuf *bytes.Buffer,
	appLogValidator appLogValidator.AppLogValidator,
) BaseMeasurement

func NewSyslogDrain

func NewSyslogDrain(
	recentLogsCommandGeneratorFunc func() []cmdStartWaiter.CmdStartWaiter,
	runner cmdRunner.CmdRunner,
	runnerOutBuf *bytes.Buffer,
	runnerErrBuf *bytes.Buffer,
	appLogValidator appLogValidator.AppLogValidator,
) BaseMeasurement

func NewTCPAvailability

func NewTCPAvailability(url string, port int) BaseMeasurement

type Measurement

type Measurement interface {
	Name() string
	Start()
	Stop()
	Results() ResultSet
	Failed() bool
	Summary() string
	SummaryData() Summary
}

func NewPeriodic

func NewPeriodic(
	logger *log.Logger,
	clock clock.Clock,
	freq time.Duration,
	baseMeasurement BaseMeasurement,
	resultSet ResultSet,
	allowedFailures int,
	shouldRetryFunc ShouldRetryFunc,
) Measurement

func NewPeriodicWithoutMeasuringImmediately

func NewPeriodicWithoutMeasuringImmediately(
	logger *log.Logger,
	clock clock.Clock,
	freq time.Duration,
	baseMeasurement BaseMeasurement,
	resultSet ResultSet,
	allowedFailures int,
	shouldRetryFunc ShouldRetryFunc,
) Measurement

type ResultSet

type ResultSet interface {
	RecordSuccess()
	RecordFailure()

	SuccessesSinceLastFailure() (int, time.Time)

	Successful() int
	Failed() int
	Total() int
}

func NewResultSet

func NewResultSet() ResultSet

type ShouldRetryFunc

type ShouldRetryFunc func(stdOut, stdErr string) bool

type Summary

type Summary struct {
	Name            string `json:"name"`
	Failed          int    `json:"failed"`
	SummaryPhrase   string `json:"summaryPhrase"`
	AllowedFailures int    `json:"allowedFailures"`
	Total           int    `json:"total"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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