failpoint

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WriteCurrentMetaError = "write-current-meta-error"
	SetQueryId            = "set-query-id"
	ColumnWriteError      = "column-writer-error"
)

Variables

This section is empty.

Functions

func ApplyFunc

func ApplyFunc(name string, target, double any)

func ApplyMethod

func ApplyMethod(name string, target any, method string, double any)

func ApplyPrivateMethod

func ApplyPrivateMethod(name string, target any, method string, double any)

func Call

func Call(name string, fn func(val *Value))

func Disable

func Disable(name string)

func Enable

func Enable(name string, val any)

Enable fail point The parameter name consists of the package name and the fault point name, for example: github.com/openGemini/openGemini/engine/write-current-meta-error

func FetchValue

func FetchValue(s string) string

func RewriteFailPointName

func RewriteFailPointName(name string, fn interface{}) string

func Sleep

func Sleep(name string, fn func())

Types

type Point

type Point struct {
	// contains filtered or unexported fields
}

func (*Point) ApplyFunc

func (p *Point) ApplyFunc(target, double any)

func (*Point) ApplyMethod

func (p *Point) ApplyMethod(target any, methodName string, double any)

func (*Point) ApplyPrivateMethod

func (p *Point) ApplyPrivateMethod(target any, methodName string, double any)

func (*Point) ResetPatches

func (p *Point) ResetPatches()

func (*Point) StoreValue

func (p *Point) StoreValue(val any)

func (*Point) Value

func (p *Point) Value() *atomic.Value

type Points

type Points struct {
	// contains filtered or unexported fields
}

func NewPoints

func NewPoints() *Points

func (*Points) Disable

func (ps *Points) Disable(name string)

func (*Points) Enable

func (ps *Points) Enable(name string, val any)

func (*Points) GetPoint

func (ps *Points) GetPoint(name string) (*Point, bool)

type Value

type Value struct {
	// contains filtered or unexported fields
}

func GetValue

func GetValue(name string, fn func()) *Value

func (*Value) Bool

func (v *Value) Bool() bool

func (*Value) Float64

func (v *Value) Float64() float64

func (*Value) Int

func (v *Value) Int() int

func (*Value) String

func (v *Value) String() string

Jump to

Keyboard shortcuts

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