(respWriter *http2RespWriter, r *http.Request)
| 172 | } |
| 173 | |
| 174 | func (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 | |
| 188 | func (c *HTTP2Connection) close() { |
| 189 | // Wait for all serve HTTP handlers to return |
no test coverage detected