prober

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 43 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidConfig is returned when the configuration is invalid.
	ErrInvalidConfig = errors.New("invalid config")
)
View Source
var (
	// Interval is used to send events in specific rate.
	Interval = 10 * time.Millisecond
)

Functions

func NewContinualVerification added in v0.24.0

func NewContinualVerification(
	name string, opts ContinualVerificationOptions,
) pkgupgrade.BackgroundOperation

NewContinualVerification will create a new continual verification operation that will verify that SUT is propagating events well through the test process. It's a general pattern that can be used to validate upgrade or performance testing.

Types

type Config

type Config struct {
	Wathola
	Interval         time.Duration
	Serving          ServingConfig
	FailOnErrors     bool
	OnDuplicate      DuplicateAction
	Ctx              context.Context
	TraceExportLimit int
}

Config represents a configuration for prober.

func NewConfig

func NewConfig() (*Config, error)

NewConfig will create a prober.Config or return error.

func NewConfigOrFail added in v0.24.0

func NewConfigOrFail(c pkgupgrade.Context) *Config

NewConfigOrFail will create a prober.Config or fail trying.

type ConfigToml added in v0.24.0

type ConfigToml struct {
	// ConfigTemplate is a template file that will be compiled to the configmap
	ConfigTemplate   string
	ConfigMapName    string
	ConfigMountPoint string
	ConfigFilename   string
}

ConfigToml represents options of wathola config toml file.

type Configurator added in v0.24.0

type Configurator func(config *Config) error

Configurator will customize default config.

type ContinualVerificationOptions added in v0.24.0

type ContinualVerificationOptions struct {
	Configurators []Configurator
	ClientOptions []testlib.SetupClientOption
}

ContinualVerificationOptions holds options for NewContinualVerification func.

type DuplicateAction added in v0.20.0

type DuplicateAction string

DuplicateAction is the action to take in case of duplicated events

const (

	// Silence will suppress notification about event duplicates.
	Silence DuplicateAction = "silence"
	// Warn will issue a warning message in case of a event duplicate.
	Warn DuplicateAction = "warn"
	// Error will fail test with an error in case of event duplicate.
	Error DuplicateAction = "error"
)

type ImageResolver added in v0.24.0

type ImageResolver func(component string) string

ImageResolver will resolve the container image for given component.

type Report

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

Report represents a receiver JSON report

type Runner added in v0.24.0

type Runner interface {
	// Setup will start a continual prober in background.
	Setup(ctx pkgupgrade.Context)

	// Verify will verify that all sent events propagated at least once.
	Verify(ctx pkgupgrade.Context)
}

Runner will run continual verification with provided configuration.

func NewRunner added in v0.24.0

func NewRunner(config *Config, options ...testlib.SetupClientOption) Runner

NewRunner will create a runner compatible with NewContinualVerification func.

type ServingConfig

type ServingConfig struct {
	Use         bool
	ScaleToZero bool
}

ServingConfig represents a options for serving test component (wathola-forwarder).

type Wathola added in v0.19.0

type Wathola struct {
	ConfigToml
	ImageResolver
	SystemUnderTest sut.SystemUnderTest
	HealthEndpoint  string
}

Wathola represents options related strictly to wathola testing tool.

Directories

Path Synopsis
wathola

Jump to

Keyboard shortcuts

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