feat: Add check service (WIP)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package model
|
||||
|
||||
type HTTPConfig struct {
|
||||
Authorization string `json:"authorization"`
|
||||
Method string `json:"method"`
|
||||
Headers map[string]string `json:"headers"`
|
||||
}
|
||||
|
||||
type ServiceTypeCheckConfig struct {
|
||||
|
||||
@@ -6,6 +6,12 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const (
|
||||
StatusOK = "ok" // Means - response ok, service is alive
|
||||
StatusFailed = "failed" // Means - response failed, all tries failed, service down
|
||||
StatusWarn = "warn" // Means - response failed after N tries and still watched
|
||||
)
|
||||
|
||||
type Status struct {
|
||||
ID int `gorm:"primary_key;auto_increment" json:"-"`
|
||||
ServiceID int `gorm:"one" json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user