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

Function setBootstrapConnectionOptsFromStartupConfig

rest/main.go:412–423  ·  view source on GitHub ↗

setBootstrapConnectionOptsFromStartupConfig sets the bootstrapConnectionOpts struct with values from the startup config.

(opts *bootstrapConnectionOpts, config *StartupConfig)

Source from the content-addressed store, hash-verified

410
411// setBootstrapConnectionOptsFromStartupConfig sets the bootstrapConnectionOpts struct with values from the startup config.
412func setBootstrapConnectionOptsFromStartupConfig(opts *bootstrapConnectionOpts, config *StartupConfig) {
413 opts.server = config.Bootstrap.Server
414 opts.username = config.Bootstrap.Username
415 opts.password = config.Bootstrap.Password
416 opts.x509CertPath = config.Bootstrap.X509CertPath
417 opts.x509KeyPath = config.Bootstrap.X509KeyPath
418 opts.caCertPath = config.Bootstrap.CACertPath
419 opts.isServerless = config.IsServerless()
420 opts.bucketCredentials = config.BucketCredentials
421 opts.tlsSkipVerify = config.Bootstrap.ServerTLSSkipVerify
422 opts.useXattrConfig = base.ValDefault(config.Unsupported.UseXattrConfig, false)
423}
424
425// setBootstrapConnectionOptsFromDbConfig sets the bootstrapConnectionOpts struct with values from the db config.
426func setBootstrapConnectionOptsFromDbConfig(opts *bootstrapConnectionOpts, dbConfig DbConfig) {

Calls 2

ValDefaultFunction · 0.92
IsServerlessMethod · 0.80

Tested by

no test coverage detected