Proper context.Context usage

This commit is contained in:
Caleb Gardner
2024-10-24 00:00:08 -05:00
parent fcab9458ee
commit 6965917e76
19 changed files with 126 additions and 118 deletions
+5 -2
View File
@@ -1,6 +1,9 @@
package backend
import "net/http"
import (
"context"
"net/http"
)
// An application interface. Both LogTable and CrashTable are optional, if they return nil then requests will be forbidden.
type App interface {
@@ -18,7 +21,7 @@ type CallbackApp interface {
// Allows for an App to filter crashes before they get added to the DB, such as making sure the crash is from the correct version.
type CrashFilterApp interface {
App
AddCrash(IndividualCrash) bool
ShouldAddCrash(context.Context, IndividualCrash) bool
}
// Allows an app more flexibility by directly interfacing with the backend's mux