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

Method GetStatus

db/background_mgr.go:248–267  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

246}
247
248func (b *BackgroundManager) GetStatus(ctx context.Context) ([]byte, error) {
249 if b.isClusterAware() {
250 status, err := b.getStatusFromCluster(ctx)
251 if err != nil {
252 return nil, err
253 }
254
255 // If we're running cluster mode, but we have no status it means we haven't run it yet.
256 // Get local status which will construct a 'initial' status
257 if status == nil {
258 status, _, err = b.getStatusLocal()
259 return status, err
260 }
261
262 return status, err
263 }
264
265 status, _, err := b.getStatusLocal()
266 return status, err
267}
268
269func (b *BackgroundManager) getStatusLocal() ([]byte, []byte, error) {
270 b.lock.Lock()

Calls 3

isClusterAwareMethod · 0.95
getStatusFromClusterMethod · 0.95
getStatusLocalMethod · 0.95