(ctx context.Context, location, docID string, valuePtr interface{})
| 292 | } |
| 293 | |
| 294 | func (cc *CouchbaseCluster) GetMetadataDocument(ctx context.Context, location, docID string, valuePtr interface{}) (cas uint64, err error) { |
| 295 | if cc == nil { |
| 296 | return 0, errors.New("nil CouchbaseCluster") |
| 297 | } |
| 298 | |
| 299 | b, teardown, err := cc.getBucket(ctx, location) |
| 300 | |
| 301 | if err != nil { |
| 302 | return 0, err |
| 303 | } |
| 304 | |
| 305 | defer teardown() |
| 306 | |
| 307 | cas, err = cc.configPersistence.loadConfig(ctx, b.DefaultCollection(), docID, valuePtr) |
| 308 | SyncGatewayStats.GlobalStats.ResourceUtilizationStats().NumIdleKvOps.Add(1) |
| 309 | return cas, err |
| 310 | } |
| 311 | |
| 312 | func (cc *CouchbaseCluster) InsertMetadataDocument(ctx context.Context, location, key string, value interface{}) (newCAS uint64, err error) { |
| 313 | if cc == nil { |
nothing calls this directly
no test coverage detected