runtime

package
v0.0.0-...-ad7f989 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoExist  = fmt.Errorf("failpoint: failpoint does not exist")
	ErrDisabled = fmt.Errorf("failpoint: failpoint is disabled")
)
View Source
var (
	ErrExhausted = fmt.Errorf("failpoint: terms exhausted")
	ErrBadParse  = fmt.Errorf("failpoint: could not parse terms")
)

Functions

func Disable

func Disable(failpath string) error

Disable stops a failpoint from firing.

func Enable

func Enable(failpath, inTerms string) error

Enable sets a failpoint to a given failpoint description.

func List

func List() []string

func Status

func Status(failpath string) (string, error)

Status gives the current setting for the failpoint

Types

type Failpoint

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

func NewFailpoint

func NewFailpoint(pkg, name string, goFailGo bool) *Failpoint

func (*Failpoint) Acquire

func (fp *Failpoint) Acquire() (interface{}, error)

Acquire gets evalutes the failpoint terms; if the failpoint is active, it will return a value. Otherwise, returns a non-nil error.

func (*Failpoint) BadType

func (fp *Failpoint) BadType(v interface{}, t string)

BadType is called when the failpoint evaluates to the wrong type.

func (*Failpoint) Release

func (fp *Failpoint) Release()

Release is called when the failpoint exists.

Jump to

Keyboard shortcuts

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