leakcheck
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
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¶
funcCheck¶
func Check(eferErrorfer)
Check looks at the currently-running goroutines and checks if there are anyinterestring (created by gRPC) goroutines leaked. It waits up to 10 secondsin the error cases.
funcRegisterIgnoreGoroutine¶
func RegisterIgnoreGoroutine(sstring)
RegisterIgnoreGoroutine appends s into the ignore goroutine list. Thegoroutines whose stack trace contains s will not be identified as leakedgoroutines. Not thread-safe, only call this function in init().