Add doc comments to server code

Points to userdocs/server/routes.rst for more information.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2026-03-10 15:35:44 -06:00
parent 5147d0970e
commit abc5f0f0b9
3 changed files with 15 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
// Package warewulfd implements the Warewulf provisioning daemon, handling
// HTTP requests from compute nodes for boot files, kernel images, overlays,
// and EFI bootloaders.
//
// See userdocs/server/routes.rst for more information.
package warewulfd
import (

View File

@@ -96,6 +96,12 @@ func parseHwaddr(hwaddr string) string {
return hwaddr
}
// parseRequest extracts provisioning parameters from an HTTP request. The
// stage and hwaddr are taken from the URL path, with fallbacks to query
// parameters and ARP cache lookup for hwaddr. Stage aliases (e.g.
// "container", "overlay-system") are normalized to their canonical names.
//
// See userdocs/server/routes.rst for more information.
func parseRequest(req *http.Request) (parsedRequest, error) {
var ret parsedRequest

View File

@@ -1,3 +1,7 @@
// Package server starts the Warewulf HTTP(S) server, registers provisioning
// and API routes, and handles TLS configuration and SIGHUP-triggered reloads.
//
// See userdocs/server/routes.rst for more information.
package server
import (