kubernetes/vendor/go.uber.org/goleak/options.go

type Option

const _defaultRetries

type opts

// implement apply so that opts struct itself can be used as
// an Option.
func (o *opts) apply(opts *opts) {}

type optionFunc

func (f optionFunc) apply(opts *opts) {}

// IgnoreTopFunction ignores any goroutines where the specified function
// is at the top of the stack. The function name should be fully qualified,
// e.g., go.uber.org/goleak.IgnoreTopFunction
func IgnoreTopFunction(f string) Option {}

// IgnoreAnyFunction ignores goroutines where the specified function
// is present anywhere in the stack.
//
// The function name must be fully qualified, e.g.,
//
//	go.uber.org/goleak.IgnoreAnyFunction
//
// For methods, the fully qualified form looks like:
//
//	go.uber.org/goleak.(*MyType).MyMethod
func IgnoreAnyFunction(f string) Option {}

// Cleanup sets up a cleanup function that will be executed at the
// end of the leak check.
// When passed to [VerifyTestMain], the exit code passed to cleanupFunc
// will be set to the exit code of TestMain.
// When passed to [VerifyNone], the exit code will be set to 0.
// This cannot be passed to [Find].
func Cleanup(cleanupFunc func(exitCode int)) Option {}

// IgnoreCurrent records all current goroutines when the option is created, and ignores
// them in any future Find/Verify calls.
func IgnoreCurrent() Option {}

func maxSleep(d time.Duration) Option {}

func addFilter(f func(stack.Stack) bool) Option {}

func buildOpts(options ...Option) *opts {}

func (o *opts) filter(s stack.Stack) bool {}

func (o *opts) retry(i int) bool {}

// isTestStack is a default filter installed to automatically skip goroutines
// that the testing package runs while the user's tests are running.
func isTestStack(s stack.Stack) bool {}

func isSyscallStack(s stack.Stack) bool {}

func isStdLibStack(s stack.Stack) bool {}