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

Function setBootstrapConnectionOptsFromDbConfig

rest/main.go:426–435  ·  view source on GitHub ↗

setBootstrapConnectionOptsFromDbConfig sets the bootstrapConnectionOpts struct with values from the db config.

(opts *bootstrapConnectionOpts, dbConfig DbConfig)

Source from the content-addressed store, hash-verified

424
425// setBootstrapConnectionOptsFromDbConfig sets the bootstrapConnectionOpts struct with values from the db config.
426func setBootstrapConnectionOptsFromDbConfig(opts *bootstrapConnectionOpts, dbConfig DbConfig) {
427 if dbConfig.Server != nil {
428 opts.server = *dbConfig.Server
429 }
430 opts.username = dbConfig.Username
431 opts.password = dbConfig.Password
432 opts.x509CertPath = dbConfig.CertPath
433 opts.x509KeyPath = dbConfig.KeyPath
434 opts.caCertPath = dbConfig.CACertPath
435}
436
437func createBootstrapConnectionWithOpts(ctx context.Context, opts bootstrapConnectionOpts) (base.BootstrapConnection, error) {
438 if base.ServerIsWalrus(opts.server) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected