prober

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 26 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FIXME: Interval is set to 200 msec, as lower values will result in errors: knative/eventing#2357
	// Interval = 10 * time.Millisecond
	Interval = 200 * time.Millisecond
)

Functions

func AssertEventProber

func AssertEventProber(t *testing.T, prober Prober)

AssertEventProber will send finish event and then verify if all events propagated well

Types

type Config

type Config struct {
	Namespace     string
	Interval      time.Duration
	Serving       ServingConfig
	FinishedSleep time.Duration
	FailOnErrors  bool
}

Config represents a configuration for prober

func NewConfig

func NewConfig(namespace string) *Config

type Prober

type Prober interface {
	// Verify will verify prober state after finished has been send
	Verify() ([]error, int)

	// Finish send finished event
	Finish()

	// ReportErrors will reports found errors in proper way
	ReportErrors(t *testing.T, errors []error)
	// contains filtered or unexported methods
}

Prober is the interface for a prober, which checks the result of the probes when stopped.

func RunEventProber

func RunEventProber(log *zap.SugaredLogger, client *testlib.Client, config *Config) Prober

RunEventProber starts a single Prober of the given domain.

type Report

type Report struct {
	State  string   `json:"state"`
	Events int      `json:"events"`
	Thrown []string `json:"thrown"`
}

Report represents a receiver JSON report

type ServingConfig

type ServingConfig struct {
	Use         bool
	ScaleToZero bool
}

Directories

Path Synopsis
wathola

Jump to

Keyboard shortcuts

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