MCPcopy
hub / github.com/cloudflare/cloudflared / handleConfigurationUpdate

Method handleConfigurationUpdate

connection/http2.go:174–186  ·  view source on GitHub ↗
(respWriter *http2RespWriter, r *http.Request)

Source from the content-addressed store, hash-verified

172}
173
174func (c *HTTP2Connection) handleConfigurationUpdate(respWriter *http2RespWriter, r *http.Request) error {
175 var configBody ConfigurationUpdateBody
176 if err := json.NewDecoder(r.Body).Decode(&configBody); err != nil {
177 return err
178 }
179 resp := c.orchestrator.UpdateConfig(configBody.Version, configBody.Config)
180 bdy, err := json.Marshal(resp)
181 if err != nil {
182 return err
183 }
184 _, err = respWriter.Write(bdy)
185 return err
186}
187
188func (c *HTTP2Connection) close() {
189 // Wait for all serve HTTP handlers to return

Callers 1

ServeHTTPMethod · 0.95

Calls 4

UpdateConfigMethod · 0.65
WriteMethod · 0.65
DecodeMethod · 0.45
MarshalMethod · 0.45

Tested by

no test coverage detected