Implement paging and refactor stores to match new store interface with paging

This commit is contained in:
TwinProduction authored and Chris committed 2021-07-18 17:29:08 -04:00
1 parent 677c7faffe
commit 7126d36d85
19 files changed
+421 -404

No files matched your search

+2 -1
View File
@@ -8,6 +8,7 @@ import (
"github.com/TwinProduction/gatus/core"
"github.com/TwinProduction/gatus/storage"
"github.com/TwinProduction/gatus/storage/store/paging"
"github.com/gorilla/mux"
)
@@ -25,7 +26,7 @@ func badgeHandler(writer http.ResponseWriter, request *http.Request) {
}
identifier := variables["identifier"]
key := strings.TrimSuffix(identifier, ".svg")
serviceStatus := storage.Get().GetServiceStatusByKey(key)
serviceStatus := storage.Get().GetServiceStatusByKey(key, paging.NewServiceStatusParams().WithUptime())
if serviceStatus == nil {
writer.WriteHeader(http.StatusNotFound)
_, _ = writer.Write([]byte("Requested service not found"))