fault

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAbortPercentage int = 100
	DefaultDelayPercentage int = 100
)

constant for default values values of abort and delay percentages

Variables

View Source
var Injectors = make(map[string]InjectFault)

Injectors fault injectors

Functions

func ApplyFaultInjection

func ApplyFaultInjection(fault *model.Fault, inv *invocation.Invocation, configuredPercent int, faultType string) error

ApplyFaultInjection abort/delay

func InstallFaultInjectionPlugin

func InstallFaultInjectionPlugin(name string, f InjectFault)

InstallFaultInjectionPlugin install fault injection plugin

func ValidateAndApplyFault

func ValidateAndApplyFault(fault *model.Fault, inv *invocation.Invocation) error

ValidateAndApplyFault validate and apply the fault rule

func ValidateFaultAbort

func ValidateFaultAbort(fault *model.Fault) error

ValidateFaultAbort checks that fault injection abort HTTP status and Percentage is valid

func ValidateFaultDelay

func ValidateFaultDelay(fault *model.Fault) error

ValidateFaultDelay checks that fault injection delay fixed delay and Percentage is valid

Types

type FaultError

type FaultError struct {
	Message string
}

FaultError fault injection error

func (FaultError) Error

func (e FaultError) Error() string

type InjectFault

type InjectFault func(model.Fault, *invocation.Invocation) error

InjectFault inject fault

Jump to

Keyboard shortcuts

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