MCPcopy
hub / github.com/caddyserver/caddy / handleStop

Function handleStop

admin.go:1127–1137  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

1125}
1126
1127func handleStop(w http.ResponseWriter, r *http.Request) error {
1128 if r.Method != http.MethodPost {
1129 return APIError{
1130 HTTPStatus: http.StatusMethodNotAllowed,
1131 Err: fmt.Errorf("method not allowed"),
1132 }
1133 }
1134
1135 exitProcess(context.Background(), Log().Named("admin.api"))
1136 return nil
1137}
1138
1139func parseCanonicalArrayIndex(idx string) (int, error) {
1140 if idx == "" {

Callers

nothing calls this directly

Calls 2

exitProcessFunction · 0.85
LogFunction · 0.85

Tested by

no test coverage detected