[PR #312] [MERGED] feat: cache proxmox version in Client #387

Closed
opened 2026-02-28 00:42:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/312
Author: @Tinyblargon
Created: 2/7/2024
Status: Merged
Merged: 2/7/2024
Merged by: @Tinyblargon

Base: masterHead: Feature-#309


📝 Commits (1)

  • dc5c753 feat: Add Version to Client

📊 Changes

2 files changed (+158 additions, -13 deletions)

View changed files

📝 proxmox/client.go (+82 -13)
proxmox/client_test.go (+76 -0)

📄 Description

Add Version() to the Client struct to return the cached PVE version and fetch it when we have no version yet.
This does add a mutex to the Client if this becomes a performance issue we can fix it using channels, but this would be more complex and require a dispatch thread.

closes #309


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Telmate/proxmox-api-go/pull/312 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 2/7/2024 **Status:** ✅ Merged **Merged:** 2/7/2024 **Merged by:** [@Tinyblargon](https://github.com/Tinyblargon) **Base:** `master` ← **Head:** `Feature-#309` --- ### 📝 Commits (1) - [`dc5c753`](https://github.com/Telmate/proxmox-api-go/commit/dc5c7531fdfd68e8997d8a720a848881bd8d7d17) feat: Add `Version` to `Client` ### 📊 Changes **2 files changed** (+158 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/client.go` (+82 -13) ➕ `proxmox/client_test.go` (+76 -0) </details> ### 📄 Description Add `Version()` to the `Client` struct to return the cached PVE version and fetch it when we have no version yet. This does add a mutex to the `Client` if this becomes a performance issue we can fix it using channels, but this would be more complex and require a dispatch thread. closes #309 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:42:00 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#387
No description provided.