MCPcopy
hub / github.com/cortexlabs/cortex / exit

Function exit

cmd/proxy/main.go:191–205  ·  view source on GitHub ↗
(log *zap.SugaredLogger, err error, wrapStrs ...string)

Source from the content-addressed store, hash-verified

189}
190
191func exit(log *zap.SugaredLogger, err error, wrapStrs ...string) {
192 if err == nil {
193 os.Exit(0)
194 }
195
196 for _, str := range wrapStrs {
197 err = errors.Wrap(err, str)
198 }
199
200 telemetry.Error(err)
201 if !errors.IsNoPrint(err) {
202 log.Fatal(err)
203 }
204 os.Exit(1)
205}
206
207func readinessTCPHandler(port int, enableTCPProbe bool, logger *zap.SugaredLogger) http.HandlerFunc {
208 return func(w http.ResponseWriter, r *http.Request) {

Callers 1

mainFunction · 0.70

Calls 3

WrapFunction · 0.92
ErrorFunction · 0.92
IsNoPrintFunction · 0.92

Tested by

no test coverage detected