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

Method getReplications

rest/admin_api.go:2174–2192  ·  view source on GitHub ↗

sg-replicate endpoints

()

Source from the content-addressed store, hash-verified

2172
2173// sg-replicate endpoints
2174func (h *handler) getReplications() error {
2175 replications, err := h.db.SGReplicateMgr.GetReplications()
2176 if err != nil {
2177 return err
2178 }
2179
2180 for _, replication := range replications {
2181 if replication.AssignedNode == h.db.UUID {
2182 replication.AssignedNode = replication.AssignedNode + " (local)"
2183 } else {
2184 replication.AssignedNode = replication.AssignedNode + " (non-local)"
2185 }
2186 replication.ReplicationConfig = *replication.Redacted(h.ctx())
2187 }
2188
2189 base.Audit(h.ctx(), base.AuditIDISGRAllRead, nil)
2190 h.writeJSON(replications)
2191 return nil
2192}
2193
2194func (h *handler) getReplication() error {
2195 replicationID := mux.Vars(h.rq)["replicationID"]

Callers

nothing calls this directly

Calls 5

ctxMethod · 0.95
writeJSONMethod · 0.95
AuditFunction · 0.92
GetReplicationsMethod · 0.45
RedactedMethod · 0.45

Tested by

no test coverage detected