failpointdemo

package module
v0.0.0-...-d3efd0e Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bar

func Bar() string

Bar returns string "bar"

func BarWithFailpointInjection

func BarWithFailpointInjection() string

BarWithFailpointInjection returns the string "bar", introduced failpoint injection

func BarWithFailpointMarker

func BarWithFailpointMarker() string

BarWithFailpointMarker returns the string "bar", introduced failpoint markder

func Foo

func Foo() string

Foo returns "foo"

func FooWithFailpointInjection

func FooWithFailpointInjection() string

FooWithFailpointInjection returns the string "foo", introduced failpoint injection

func FooWithFailpointMarker

func FooWithFailpointMarker() string

FooWithFailpointMarker returns the string "foo", introduced failpoint markder

Types

type FailpointMarker

type FailpointMarker bool

FailpointMarker marks a failpoint

var (
	// ReturnString returns an arbitrary string
	ReturnString FailpointMarker

	// Panic panics current routine
	Panic FailpointMarker

	// Sleep blocks the functon for a while
	Sleep FailpointMarker
)

func (*FailpointMarker) Disable

func (m *FailpointMarker) Disable() error

Disable a failpoint

func (*FailpointMarker) Enable

func (m *FailpointMarker) Enable(expr string) error

Enable a failpoint marker

func (*FailpointMarker) Eval

func (m *FailpointMarker) Eval() (failpoint.Value, bool)

Eval a failpoint marker

Jump to

Keyboard shortcuts

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