#136: Start working on database persistence
This commit is contained in:
1 parent
e6335da94f
commit
bd1eb7c61b
657 files changed
+2190821
-82
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package database
|
||||
|
||||
import "github.com/TwinProduction/gatus/core"
|
||||
|
||||
func generateEventBasedOnResult(result *core.Result) *core.Event {
|
||||
var eventType core.EventType
|
||||
if result.Success {
|
||||
eventType = core.EventHealthy
|
||||
} else {
|
||||
eventType = core.EventUnhealthy
|
||||
}
|
||||
return &core.Event{
|
||||
Type: eventType,
|
||||
Timestamp: result.Timestamp,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user