feat(api): Add server info, network health, and resource management#86
Merged
feat(api): Add server info, network health, and resource management#86
Conversation
Code Review SummaryThis PR adds several useful endpoints for server information, network health, and container resource management. The implementation is generally solid and follows existing patterns in the codebase. 🚀 Key Improvements
💡 Minor Suggestions
|
| return | ||
| } | ||
|
|
||
| resources, _ := docker.GetContainerResources(id) |
There was a problem hiding this comment.
The error from GetContainerResources is ignored here. If the update succeeded but the subsequent fetch fails, the client receives a partial/successful response that might be misleading.
Suggested change
| resources, _ := docker.GetContainerResources(id) | |
| resources, err := docker.GetContainerResources(id) | |
| if err != nil { | |
| c.JSON(http.StatusOK, gin.H{ | |
| "message": "Resources updated, but failed to fetch current limits", | |
| "error": err.Error(), | |
| }) | |
| return | |
| } |
Server info endpoint returns hostname, public IPs, and network interfaces. Network health checks DNS resolution against multiple resolvers (8.8.8.8, 1.1.1.1, 9.9.9.9) with latency and tests external connectivity. Resource endpoints allow reading and updating container memory/CPU limits via docker update. Closes #77, closes #79 Signed-off-by: nfebe <fenn25.fn@gmail.com>
3173ac9 to
d79dbbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Server info endpoint returns hostname, public IPs, and network interfaces. Network health checks DNS resolution against multiple resolvers (8.8.8.8, 1.1.1.1, 9.9.9.9) with latency and tests external connectivity. Resource endpoints allow reading and updating container memory/CPU limits via docker update.
Closes #77, closes #79