MCPcopy Create free account
hub / github.com/cloudflare/cloudflared / CleanupConnections

Method CleanupConnections

cfapi/tunnel.go:238–249  ·  view source on GitHub ↗
(tunnelID uuid.UUID, params *CleanupParams)

Source from the content-addressed store, hash-verified

236}
237
238func (r *RESTClient) CleanupConnections(tunnelID uuid.UUID, params *CleanupParams) error {
239 endpoint := r.baseEndpoints.accountLevel
240 endpoint.RawQuery = params.encode()
241 endpoint.Path = path.Join(endpoint.Path, fmt.Sprintf("%v/connections", tunnelID))
242 resp, err := r.sendRequest("DELETE", endpoint, nil)
243 if err != nil {
244 return errors.Wrap(err, "REST request failed")
245 }
246 defer resp.Body.Close()
247
248 return r.statusCodeToError("cleanup connections", resp)
249}
250
251func unmarshalTunnel(reader io.Reader) (*Tunnel, error) {
252 var tunnel Tunnel

Callers

nothing calls this directly

Calls 4

sendRequestMethod · 0.95
statusCodeToErrorMethod · 0.95
CloseMethod · 0.65
encodeMethod · 0.45

Tested by

no test coverage detected