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

Function getLocalStatus

db/active_replicator_common.go:537–546  ·  view source on GitHub ↗

getLocalStatus retrieves replication status for a given client ID from the given metadataStore

(ctx context.Context, metadataStore base.DataStore, statusKey string)

Source from the content-addressed store, hash-verified

535
536// getLocalStatus retrieves replication status for a given client ID from the given metadataStore
537func getLocalStatus(ctx context.Context, metadataStore base.DataStore, statusKey string) (*ReplicationStatus, error) {
538 localStatusDoc, err := getLocalStatusDoc(ctx, metadataStore, statusKey)
539 if err != nil {
540 return nil, err
541 }
542 if localStatusDoc != nil {
543 return localStatusDoc.Status, nil
544 }
545 return nil, nil
546}
547
548// setLocalStatus updates replication status.
549func setLocalStatus(ctx context.Context, metadataStore base.DataStore, statusKey string, status *ReplicationStatus, localDocExpirySecs int) (err error) {

Callers 1

LoadReplicationStatusFunction · 0.85

Calls 1

getLocalStatusDocFunction · 0.85

Tested by

no test coverage detected