Documentation
¶
Index ¶
- func Disabled(fl *FaultLine)
- func Enabled(fl *FaultLine)
- func ReplaceGlobals(fl *FaultLine)
- type FaultLine
- func (fl *FaultLine) DoInTheFuture(before time.Duration, f func(), ctx context.Context) bool
- func (fl *FaultLine) Possible() bool
- func (fl *FaultLine) PossibleDelay(ctx context.Context) bool
- func (fl *FaultLine) PossibleError(err error) error
- func (fl *FaultLine) PossibleErrorOr(existing error, possible error) error
- func (fl *FaultLine) PossiblyDoInTheFuture(before time.Duration, f func(), ctx context.Context) bool
- func (fl *FaultLine) PossiblyPanicInTheFuture(before time.Duration, ctx context.Context) bool
- func (fl *FaultLine) PossiblySignalInTheFuture(signal os.Signal, before time.Duration, ctx context.Context) bool
- func (fl *FaultLine) With(options ...Option) *FaultLine
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceGlobals ¶
func ReplaceGlobals(fl *FaultLine)
ReplaceGlobals will replace the core fault line object
Types ¶
type FaultLine ¶
type FaultLine struct {
// contains filtered or unexported fields
}
func (*FaultLine) DoInTheFuture ¶
func (*FaultLine) Possible ¶
Possible determines whether the possibility probability evaluated to true
func (*FaultLine) PossibleDelay ¶
PossibleDelay will maybe add a small sleep time at the invocation site. Whether to sleep or not, and the exactly sleep time, are determined by the configuration of the FaultLine.
func (*FaultLine) PossibleError ¶
PossibleError will maybe return a specific error here
func (*FaultLine) PossibleErrorOr ¶
PossibleErrorOr is a convenience feature that will return the existing error if not nil
func (*FaultLine) PossiblyDoInTheFuture ¶
func (*FaultLine) PossiblyPanicInTheFuture ¶
func (*FaultLine) PossiblySignalInTheFuture ¶
type Option ¶
type Option func(fl *FaultLine)
func DisabledIf ¶
func MaximumDelay ¶
func ModifiedDelay ¶
func Possibility ¶
Click to show internal directories.
Click to hide internal directories.