Documentation ¶
Overview ¶
Package leakcheck contains functions to check leaked goroutines.
Call "defer leakcheck.Check(t)" at the beginning of tests.
This is very closely based on grpc-go's leakcheck.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(efer Errorfer)
Check looks at the currently-running goroutines and checks if there are any interestring (created by gRPC) goroutines leaked. It waits up to 10 seconds in the error cases.
func RegisterIgnoreGoroutine ¶
func RegisterIgnoreGoroutine(s string)
RegisterIgnoreGoroutine appends s into the ignore goroutine list. The goroutines whose stack trace contains s will not be identified as leaked goroutines. Not thread-safe, only call this function in init().
Types ¶
Click to show internal directories.
Click to hide internal directories.