env_group.go 1.0 KB

1234567891011121314151617181920212223242526272829
  1. package model
  2. // PostSyncActionType defines the type of action after synchronization
  3. const (
  4. // PostSyncActionNone indicates no operation after sync
  5. PostSyncActionNone = "none"
  6. // PostSyncActionReloadNginx indicates reload Nginx after sync
  7. PostSyncActionReloadNginx = "reload_nginx"
  8. )
  9. // UpstreamTestType defines the type of upstream test
  10. const (
  11. // UpstreamTestLocal indicates local upstream test
  12. UpstreamTestLocal = "local"
  13. // UpstreamTestRemote indicates remote upstream test
  14. UpstreamTestRemote = "remote"
  15. // UpstreamTestMirror indicates mirror upstream test
  16. UpstreamTestMirror = "mirror"
  17. )
  18. // EnvGroup represents a group of environments that can be synced across nodes
  19. type EnvGroup struct {
  20. Model
  21. Name string `json:"name"`
  22. SyncNodeIds []uint64 `json:"sync_node_ids" gorm:"serializer:json"`
  23. OrderID int `json:"-" gorm:"default:0"`
  24. PostSyncAction string `json:"post_sync_action" gorm:"default:'reload_nginx'"`
  25. UpstreamTestType string `json:"upstream_test_type" gorm:"default:'local'"`
  26. }