sg-replicate endpoints
()
| 2172 | |
| 2173 | // sg-replicate endpoints |
| 2174 | func (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 | |
| 2194 | func (h *handler) getReplication() error { |
| 2195 | replicationID := mux.Vars(h.rq)["replicationID"] |
nothing calls this directly
no test coverage detected