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

Method GetConfig

rest/config_manager.go:59–61  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
59func (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

Calls 2

PersistentConfigKeyFunction · 0.85
GetMetadataDocumentMethod · 0.65