mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:18:31 +02:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user