refactor(proxmox): consolidate NodeConfig and add service field

Centralize Proxmox node configuration by moving `ProxmoxConfig` from `internal/types/idlewatcher.go` to a new `NodeConfig` struct in `internal/proxmox/node.go`.

- Add `proxmox` field to route; allowing `proxy.app.proxmox` labels and corresponding route file config
- Added `service` optional field to NodeConfig for service identification
- Integrated Proxmox config directly into Route struct with proper validation
- Propagate Proxmox settings to Idlewatcher during route validation
- Updated swagger documentation to reflect schema changes
This commit is contained in:
yusing
2026-01-24 21:33:47 +08:00
parent ea6543b3f9
commit e3001a70ed
5 changed files with 48 additions and 10 deletions

View File

@@ -10,6 +10,12 @@ import (
"github.com/yusing/goutils/pool"
)
type NodeConfig struct {
Node string `json:"node" validate:"required"`
VMID int `json:"vmid" validate:"required"`
Service string `json:"service,omitempty"`
} // @name ProxmoxNodeConfig
type Node struct {
name string
id string // likely node/<name>