refactor(proxmox): change VMID type from int to uint64 across Proxmox provider

Updates VMID parameter and field types from int to uint64 throughout the Proxmox provider implementation,
including API request structures, provider structs, client methods, and LXC-related functions.
Also updates string conversion calls from strconv.Itoa to strconv.FormatUint.
This commit is contained in:
yusing
2026-02-10 16:53:07 +08:00
parent 3aba728a3a
commit 978dd886c0
9 changed files with 21 additions and 24 deletions

View File

@@ -18,7 +18,7 @@ import (
type ProxmoxProvider struct {
*proxmox.Node
vmid int
vmid uint64
lxcName string
running bool
}
@@ -27,7 +27,7 @@ const proxmoxStateCheckInterval = 1 * time.Second
var ErrNodeNotFound = gperr.New("node not found in pool")
func NewProxmoxProvider(ctx context.Context, nodeName string, vmid int) (idlewatcher.Provider, error) {
func NewProxmoxProvider(ctx context.Context, nodeName string, vmid uint64) (idlewatcher.Provider, error) {
if nodeName == "" || vmid == 0 {
return nil, errors.New("node name and vmid are required")
}
@@ -102,7 +102,7 @@ func (p *ProxmoxProvider) Watch(ctx context.Context) (<-chan watcher.Event, <-ch
event := watcher.Event{
Type: events.EventTypeDocker,
ActorID: strconv.Itoa(p.vmid),
ActorID: strconv.FormatUint(p.vmid, 10),
ActorName: p.lxcName,
}
for {