faultinjector

package
v0.12.13 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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.

func (*Request) Validate

func (r *Request) Validate() error

type XIDToInject

type XIDToInject struct {
	ID int `json:"id"`
}

Jump to

Keyboard shortcuts

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