getLocalStatus retrieves replication status for a given client ID from the given metadataStore
(ctx context.Context, metadataStore base.DataStore, statusKey string)
| 535 | |
| 536 | // getLocalStatus retrieves replication status for a given client ID from the given metadataStore |
| 537 | func 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. |
| 549 | func setLocalStatus(ctx context.Context, metadataStore base.DataStore, statusKey string, status *ReplicationStatus, localDocExpirySecs int) (err error) { |
no test coverage detected