Documentation
¶
Overview ¶
Package faultinjector provides a way to inject failures into the system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoFaultFound = errors.New("no fault injection entry found")
Functions ¶
This section is empty.
Types ¶
type Injector ¶
type Injector interface {
KmsgWriter() pkgkmsgwriter.KmsgWriter
}
Injector defines the interface for injecting failures into the system.
func NewInjector ¶
func NewInjector(kmsgWriter pkgkmsgwriter.KmsgWriter) Injector
type Request ¶
type Request struct {
// XID is the XID to inject.
XID *XIDToInject `json:"xid,omitempty"`
// KernelMessage is the kernel message to inject.
KernelMessage *pkgkmsgwriter.KernelMessage `json:"kernel_message,omitempty"`
}
Request is the request body for the inject-fault endpoint.
type XIDToInject ¶
type XIDToInject struct {
ID int `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.