MCPcopy
hub / github.com/yusing/godoxy / writeLoadingPage

Method writeLoadingPage

internal/idlewatcher/loading_page.go:37–53  ·  view source on GitHub ↗
(rw http.ResponseWriter)

Source from the content-addressed store, hash-verified

35}
36
37func (w *Watcher) writeLoadingPage(rw http.ResponseWriter) error {
38 msg := w.cfg.ContainerName() + " is starting..."
39
40 data := new(templateData)
41 data.Title = w.cfg.ContainerName()
42 data.Message = msg
43 data.FavIconPath = idlewatcher.FavIconPath
44 data.LoadingPageCSSPath = idlewatcher.LoadingPageCSSPath
45 data.LoadingPageJSPath = idlewatcher.LoadingPageJSPath
46 data.WakeEventsPath = idlewatcher.WakeEventsPath
47
48 rw.Header().Set("Content-Type", "text/html; charset=utf-8")
49 setNoStoreHeaders(rw.Header())
50 rw.Header().Add("Connection", "close")
51 err := loadingPageTmpl.Execute(rw, data)
52 return err
53}

Callers 3

DebugHandlerFunction · 0.95
wakeFromHTTPMethod · 0.95

Calls 5

setNoStoreHeadersFunction · 0.85
ContainerNameMethod · 0.80
AddMethod · 0.65
SetMethod · 0.45
HeaderMethod · 0.45

Tested by 1