mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 16:58:31 +02:00
feat(proxmox): enhance VM resource tracking with auto-discovery and cached IPs
- Add VMResource wrapper type with cached IP addresses for efficient lookups - Implement concurrent IP fetching during resource updates (limited concurrency) - Add ReverseLookupResource for discovering VMs by IP, hostname, or alias - Prioritize interfaces API over config for IP retrieval (offline container fallback) - Enable routes to auto-discover Proxmox resources when no explicit config provided - Fix configuration type from value to pointer slice for correct proxmox client retrievel - Ensure Proxmox providers are initialized before route validation
This commit is contained in:
@@ -111,7 +111,6 @@ func (state *state) Init(data []byte) error {
|
||||
g := gperr.NewGroup("config load error")
|
||||
g.Go(state.initMaxMind)
|
||||
g.Go(state.initProxmox)
|
||||
g.Go(state.loadRouteProviders)
|
||||
g.Go(state.initAutoCert)
|
||||
|
||||
errs := g.Wait()
|
||||
@@ -119,6 +118,7 @@ func (state *state) Init(data []byte) error {
|
||||
errs.Add(state.initNotification())
|
||||
errs.Add(state.initACL())
|
||||
errs.Add(state.initEntrypoint())
|
||||
errs.Add(state.loadRouteProviders())
|
||||
return errs.Error()
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ type (
|
||||
Docker map[string]types.DockerProviderConfig `json:"docker" yaml:"docker,omitempty" validate:"non_empty_docker_keys"`
|
||||
Agents []*agent.AgentConfig `json:"agents" yaml:"agents,omitempty"`
|
||||
Notification []*notif.NotificationConfig `json:"notification" yaml:"notification,omitempty"`
|
||||
Proxmox []proxmox.Config `json:"proxmox" yaml:"proxmox,omitempty"`
|
||||
Proxmox []*proxmox.Config `json:"proxmox" yaml:"proxmox,omitempty"`
|
||||
MaxMind *maxmind.Config `json:"maxmind" yaml:"maxmind,omitempty"`
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user