MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / handleSGCollectCancel

Method handleSGCollectCancel

rest/admin_api.go:1649–1659  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1647}
1648
1649func (h *handler) handleSGCollectCancel() error {
1650 err := h.server.SGCollect.Stop()
1651 if err != nil {
1652 return base.HTTPErrorf(http.StatusBadRequest, "Error stopping sgcollect_info: %v", err)
1653 }
1654
1655 h.writeRawJSONStatus(http.StatusOK, []byte(`{"status":"cancelled"}`))
1656
1657 base.Audit(h.ctx(), base.AuditIDSyncGatewayCollectInfoStop, nil)
1658 return nil
1659}
1660
1661func (h *handler) handleSGCollect() error {
1662 body, err := h.readBody()

Callers

nothing calls this directly

Calls 5

writeRawJSONStatusMethod · 0.95
ctxMethod · 0.95
HTTPErrorfFunction · 0.92
AuditFunction · 0.92
StopMethod · 0.65

Tested by

no test coverage detected