Documentation ¶
Overview ¶
Package chaos is used to simulate Chaos engineering (random failures) in the SMTPD server. See https://en.wikipedia.org/wiki/Chaos_engineering See https://mailpit.axllent.org/docs/integration/chaos/
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Enabled is a flag to enable or disable support for chaos Enabled = false // Config is the global Chaos configuration Config = Triggers{ Sender: Trigger{ErrorCode: 451, Probability: 0}, Recipient: Trigger{ErrorCode: 451, Probability: 0}, Authentication: Trigger{ErrorCode: 535, Probability: 0}, } )
Functions ¶
func SetFromStruct ¶
SetFromStruct will set a whole map of chaos configurations (ie: API)
Types ¶
type Trigger ¶
type Trigger struct { // SMTP error code to return. The value must range from 400 to 599. // required: true // example: 451 ErrorCode int // Probability (chance) of triggering the error. The value must range from 0 to 100. // required: true // example: 5 Probability int }
Trigger for Chaos
type Triggers ¶
type Triggers struct { // Sender trigger to fail on From, Sender Sender Trigger // Recipient trigger to fail on To, Cc, Bcc Recipient Trigger // Authentication trigger to fail while authenticating (auth must be configured) Authentication Trigger }
Triggers for the Chaos configuration
swagger:model Triggers
Click to show internal directories.
Click to hide internal directories.