aboutsummaryrefslogtreecommitdiff
path: root/internal/handlers/polling.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers/polling.go')
-rw-r--r--internal/handlers/polling.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/handlers/polling.go b/internal/handlers/polling.go
index 12f36e2..51fd8ad 100644
--- a/internal/handlers/polling.go
+++ b/internal/handlers/polling.go
@@ -28,6 +28,16 @@ import (
"github.com/thousandeyes/shoelaces/internal/utils"
)
+// StartPollingHandler is called by iPXE boot agents. It returns the poll script.
+func StartPollingHandler(w http.ResponseWriter, r *http.Request) {
+ env := envFromRequest(r)
+
+ script := polling.GenStartScript(env.Logger, env.BaseURL)
+
+ w.Write([]byte(script))
+}
+
+
// PollHandler is called by iPXE boot agents. It returns the boot script
// specified on the configuration or, if the host is unknown, it makes it
// retry for a while until the user specifies alternative IPXE boot script.
nihil fit ex nihilo