Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyFaultInjection(fault *model.Fault, inv *invocation.Invocation, configuredPercent int, ...) error
- func InstallFaultInjectionPlugin(name string, f InjectFault)
- func ValidateAndApplyFault(fault *model.Fault, inv *invocation.Invocation) error
- func ValidateFaultAbort(fault *model.Fault) error
- func ValidateFaultDelay(fault *model.Fault) error
- type InjectFault
Constants ¶
View Source
const ( DefaultAbortPercentage int = 100 DefaultDelayPercentage int = 100 )
constant for default values values of abort and delay percentages
Variables ¶
View Source
var FaultInjectors = make(map[string]InjectFault)
FaultInjectors 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 ¶
ValidateFaultAbort checks that fault injection abort HTTP status and Percentage is valid
func ValidateFaultDelay ¶
ValidateFaultDelay checks that fault injection delay fixed delay and Percentage is valid
Types ¶
type InjectFault ¶
type InjectFault func(model.Fault, *invocation.Invocation) error
InjectFault inject fault
Click to show internal directories.
Click to hide internal directories.