Skip to content

feat(api): Add server info, network health, and resource management#86

Merged
nfebe merged 1 commit intomainfrom
feat/resource-and-server-health
Mar 18, 2026
Merged

feat(api): Add server info, network health, and resource management#86
nfebe merged 1 commit intomainfrom
feat/resource-and-server-health

Conversation

@nfebe
Copy link
Contributor

@nfebe nfebe commented Mar 18, 2026

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

@sourceant
Copy link

sourceant bot commented Mar 18, 2026

Code Review Summary

This 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

  • Added resource limit management for containers and deployments.
  • Implemented network health checks including DNS resolution and external connectivity.
  • Included comprehensive test coverage for the new API endpoints and internal logic.

💡 Minor Suggestions

  • Improve error handling and context usage in network calls.
  • Consider struct-based validation for resource updates.

Copy link

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. See the overview comment for a summary.

return
}

resources, _ := docker.GetContainerResources(id)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@nfebe nfebe force-pushed the feat/resource-and-server-health branch from 3173ac9 to d79dbbd Compare March 18, 2026 13:14
Copy link

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. See the overview comment for a summary.

@nfebe nfebe merged commit 672ec21 into main Mar 18, 2026
5 checks passed
@nfebe nfebe deleted the feat/resource-and-server-health branch March 18, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add support for resource allocation feat: Obtain and return server details and more checks

1 participant