{"modulePath":"github.com/chainloop-dev/chainloop","version":"v1.138.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package panicguard\n\nPackage panicguard runs background work in a goroutine with a recovery frame.\n\nThe gRPC recovery middleware only wraps the request handler's own stack. A goroutine spawned from a handler escapes it, so an unrecovered panic there terminates the whole process. Any request-spawned goroutine must therefore run through this package instead of a bare \\`go\\`.\n\n## Functions\n\n```go\nfunc Go(logger *log.Helper, task string, fn func())\n```\nGo runs fn in a new goroutine with a recovery frame. A recovered panic is logged with its stack and swallowed so it cannot crash the process.\n\n```go\nfunc Recover(logger *log.Helper, task string, fn func())\n```\nRecover runs fn in the current goroutine with a recovery frame. It is the synchronous core of Go, exposed for callers that already own a goroutine and for tests.\n\n","path":"github.com/chainloop-dev/chainloop/app/controlplane/internal/panicguard","name":"panicguard","synopsis":"Package panicguard runs background work in a goroutine with a recovery frame.","isRedistributable":true}
