GetConfig fetches a database config for a given bucket and config group ID, along with the CAS of the config document. GetConfig does *not* validate that config version matches registry version - operations requiring synchronization with registry should use getRegistryAndDatabase, or getConfig with
(ctx context.Context, bucketName, groupID, dbName string, config *DatabaseConfig)
| 57 | // GetConfig does *not* validate that config version matches registry version - operations requiring synchronization |
| 58 | // with registry should use getRegistryAndDatabase, or getConfig with the required version |
| 59 | func (b *bootstrapContext) GetConfig(ctx context.Context, bucketName, groupID, dbName string, config *DatabaseConfig) (cas uint64, err error) { |
| 60 | return b.Connection.GetMetadataDocument(ctx, bucketName, PersistentConfigKey(ctx, groupID, dbName), config) |
| 61 | } |
| 62 | |
| 63 | // InsertConfig saves a new database config for a given bucket and config group ID. This is a three-step process: |
| 64 | // 1. getRegistryAndDatabase to enforce synchronization pre-update |