feat: Add check service (WIP)

This commit is contained in:
2025-07-21 01:59:03 +03:00
parent 691d1e7275
commit 87defbf391
9 changed files with 219 additions and 7 deletions

View File

@@ -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 {

View File

@@ -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:"-"`