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

Method handleDbOffline

rest/admin_api.go:261–269  ·  view source on GitHub ↗

Take a DB offline

()

Source from the content-addressed store, hash-verified

259
260// Take a DB offline
261func (h *handler) handleDbOffline() error {
262 h.assertAdminOnly()
263 if err := h.db.TakeDbOffline(base.NewNonCancelCtx(), "ADMIN Request"); err != nil {
264 base.InfofCtx(h.ctx(), base.KeyCRUD, "Unable to take Database : %v, offline", base.MD(h.db.Name))
265 return err
266 }
267 base.Audit(h.ctx(), base.AuditIDDatabaseOffline, nil)
268 return nil
269}
270
271// handleIndexInit allows async index initialization status to be viewed
272func (h *handler) handleGetIndexInit() error {

Callers

nothing calls this directly

Calls 7

assertAdminOnlyMethod · 0.95
ctxMethod · 0.95
NewNonCancelCtxFunction · 0.92
InfofCtxFunction · 0.92
MDFunction · 0.92
AuditFunction · 0.92
TakeDbOfflineMethod · 0.45

Tested by

no test coverage detected