feat: publish standalone worker

Separate worker packaging and service lifecycle from the control plane.
Этот коммит содержится в:
Gleb Tv
2026-07-13 17:55:14 +03:00
Коммит 2c7a0236da
309 изменённых файлов: 44004 добавлений и 0 удалений

20
app/models/region.go Обычный файл
Просмотреть файл

@@ -0,0 +1,20 @@
package models
import (
"rsgit.ru/rsmon/rsmon/app/models/concerns"
)
// DefaultRegionCode is the historical default region code seeded by
// Migrate() (see app/models/migrate.go). Centralized here so admin
// endpoints and check_jobs.go agree on the literal.
const DefaultRegionCode = "local"
// Region represents a geographic region where distributed workers can run
type Region struct {
concerns.Model
Code string `gorm:"uniqueIndex;size:20;not null" json:"code"` // e.g. "ru-msk", "us-east", "eu-west"
Name string `gorm:"not null" json:"name"` // "Moscow, Russia"
Enabled bool `gorm:"not null;default:true" json:"enabled"`
Priority int `gorm:"not null;default:0" json:"priority"`
concerns.Timestamped
}