gatus/storage/store/database/util.go
2021-07-18 17:29:08 -04:00

17 lines
343 B
Go

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,
}
}