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

Function registerConfigFlags

rest/config_flags.go:32–175  ·  view source on GitHub ↗

registerConfigFlags holds a map of the flag values with the configFlag it goes with (which stores the corresponding config field pointer and flag value).

(config *StartupConfig, fs *flag.FlagSet)

Source from the content-addressed store, hash-verified

30// registerConfigFlags holds a map of the flag values with the configFlag it goes with
31// (which stores the corresponding config field pointer and flag value).
32func registerConfigFlags(config *StartupConfig, fs *flag.FlagSet) map[string]configFlag {
33 return map[string]configFlag{
34 "bootstrap.group_id": {config: &config.Bootstrap.ConfigGroupID, flagValue: fs.String("bootstrap.group_id", "", "The config group ID to use when discovering databases. Allows for non-homogenous configuration")},
35 "bootstrap.config_update_frequency": {config: &config.Bootstrap.ConfigUpdateFrequency, flagValue: fs.String("bootstrap.config_update_frequency", persistentConfigDefaultUpdateFrequency.String(), "How often to poll Couchbase Server for new config changes")},
36 "bootstrap.server": {config: &config.Bootstrap.Server, flagValue: fs.String("bootstrap.server", "", "Couchbase Server connection string/URL")},
37 "bootstrap.username": {config: &config.Bootstrap.Username, flagValue: fs.String("bootstrap.username", "", "Username for authenticating to server")},
38 "bootstrap.password": {config: nil, disabled: true, disabledErrorMessage: "Use config file to specify bootstrap password, or use X.509 cert/key path flags instead.", flagValue: fs.String("bootstrap.password", "", "Deprecated and disabled. Do not use. Use config file or X.509 auth.")},
39 "bootstrap.ca_cert_path": {config: &config.Bootstrap.CACertPath, flagValue: fs.String("bootstrap.ca_cert_path", "", "Root CA cert path for TLS connection")},
40 "bootstrap.server_tls_skip_verify": {config: &config.Bootstrap.ServerTLSSkipVerify, flagValue: fs.Bool("bootstrap.server_tls_skip_verify", false, "Allow empty server CA Cert Path without attempting to use system root pool")},
41 "bootstrap.x509_cert_path": {config: &config.Bootstrap.X509CertPath, flagValue: fs.String("bootstrap.x509_cert_path", "", "Cert path (public key) for X.509 bucket auth")},
42 "bootstrap.x509_key_path": {config: &config.Bootstrap.X509KeyPath, flagValue: fs.String("bootstrap.x509_key_path", "", "Key path (private key) for X.509 bucket auth")},
43 "bootstrap.use_tls_server": {config: &config.Bootstrap.UseTLSServer, flagValue: fs.Bool("bootstrap.use_tls_server", false, "Forces the connection to Couchbase Server to use TLS")},
44
45 "api.public_interface": {config: &config.API.PublicInterface, flagValue: fs.String("api.public_interface", "", "Network interface to bind public API to")},
46 "api.admin_interface": {config: &config.API.AdminInterface, flagValue: fs.String("api.admin_interface", "", "Network interface to bind admin API to")},
47 "api.metrics_interface": {config: &config.API.MetricsInterface, flagValue: fs.String("api.metrics_interface", "", "Network interface to bind metrics API to")},
48 "api.profile_interface": {config: &config.API.ProfileInterface, flagValue: fs.String("api.profile_interface", "", "Network interface to bind profiling API to")},
49 "api.admin_interface_authentication": {config: &config.API.AdminInterfaceAuthentication, flagValue: fs.Bool("api.admin_interface_authentication", false, "Whether the admin API requires authentication")},
50 "api.metrics_interface_authentication": {config: &config.API.MetricsInterfaceAuthentication, flagValue: fs.Bool("api.metrics_interface_authentication", false, "Whether the metrics API requires authentication")},
51 "api.enable_admin_authentication_permissions_check": {config: &config.API.EnableAdminAuthenticationPermissionsCheck, flagValue: fs.Bool("api.enable_admin_authentication_permissions_check", false, "Whether to enable the DP permissions check feature of admin auth")},
52 "api.server_read_timeout": {config: &config.API.ServerReadTimeout, flagValue: fs.String("api.server_read_timeout", "", "Maximum duration.Second before timing out read of the HTTP(S) request")},
53 "api.server_write_timeout": {config: &config.API.ServerWriteTimeout, flagValue: fs.String("api.server_write_timeout", "", "Maximum duration.Second before timing out write of the HTTP(S) response")},
54 "api.read_header_timeout": {config: &config.API.ReadHeaderTimeout, flagValue: fs.String("api.read_header_timeout", "", "The amount of time allowed to read request headers")},
55 "api.idle_timeout": {config: &config.API.IdleTimeout, flagValue: fs.String("api.idle_timeout", "", "The maximum amount of time to wait for the next request when keep-alives are enabled")},
56 "api.pretty": {config: &config.API.Pretty, flagValue: fs.Bool("api.pretty", false, "Pretty-print JSON responses")},
57 "api.max_connections": {config: &config.API.MaximumConnections, flagValue: fs.Uint("api.max_connections", 0, "Max # of incoming HTTP connections to accept")},
58 "api.compress_responses": {config: &config.API.CompressResponses, flagValue: fs.Bool("api.compress_responses", false, "If false, disables compression of HTTP responses")},
59 "api.hide_product_version": {config: &config.API.CompressResponses, flagValue: fs.Bool("api.hide_product_version", false, "Whether product versions removed from Server headers and REST API responses")},
60
61 "api.https.tls_minimum_version": {config: &config.API.HTTPS.TLSMinimumVersion, flagValue: fs.String("api.https.tls_minimum_version", "", "The minimum allowable TLS version for the REST APIs")},
62 "api.https.tls_cert_path": {config: &config.API.HTTPS.TLSCertPath, flagValue: fs.String("api.https.tls_cert_path", "", "The TLS cert file to use for the REST APIs")},
63 "api.https.tls_key_path": {config: &config.API.HTTPS.TLSKeyPath, flagValue: fs.String("api.https.tls_key_path", "", "The TLS key file to use for the REST APIs")},
64
65 "api.cors.origin": {config: &config.API.CORS.Origin, flagValue: fs.String("api.cors.origin", "", "List of comma separated allowed origins. Use '*' to allow access from everywhere")},
66 "api.cors.login_origin": {config: &config.API.CORS.LoginOrigin, flagValue: fs.String("api.cors.login_origin", "", "List of comma separated allowed login origins")},
67 "api.cors.headers": {config: &config.API.CORS.Headers, flagValue: fs.String("api.cors.headers", "", "List of comma separated allowed headers")},
68 "api.cors.max_age": {config: &config.API.CORS.MaxAge, flagValue: fs.Int("api.cors.max_age", 0, "Maximum age of the CORS Options request")},
69
70 "logging.log_file_path": {config: &config.Logging.LogFilePath, flagValue: fs.String("logging.log_file_path", "", "Absolute or relative path on the filesystem to the log file directory. A relative path is from the directory that contains the Sync Gateway executable file")},
71 "logging.redaction_level": {config: &config.Logging.RedactionLevel, flagValue: fs.String("logging.redaction_level", "", "Redaction level to apply to log output. Options: none, partial, full, unset")},
72
73 "logging.console.enabled": {config: &config.Logging.Console.Enabled, flagValue: fs.Bool("logging.console.enabled", false, "")},
74 "logging.console.rotation.max_size": {config: &config.Logging.Console.Rotation.MaxSize, flagValue: fs.Int("logging.console.rotation.max_size", 0, "")},
75 "logging.console.rotation.max_age": {config: &config.Logging.Console.Rotation.MaxAge, flagValue: fs.Int("logging.console.rotation.max_age", 0, "")},
76 "logging.console.rotation.localtime": {config: &config.Logging.Console.Rotation.LocalTime, flagValue: fs.Bool("logging.console.rotation.localtime", false, "")},
77 "logging.console.rotation.rotated_logs_size_limit": {config: &config.Logging.Console.Rotation.RotatedLogsSizeLimit, flagValue: fs.Int("logging.console.rotation.rotated_logs_size_limit", 0, "")},
78 "logging.console.rotation.rotation_interval": {config: &config.Logging.Console.Rotation.RotationInterval, flagValue: fs.String("logging.console.rotation.rotation_interval", "", "")},
79 "logging.console.collation_buffer_size": {config: &config.Logging.Console.CollationBufferSize, flagValue: fs.Int("logging.console.collation_buffer_size", 0, "")},
80 "logging.console.log_level": {config: &config.Logging.Console.LogLevel, flagValue: fs.String("logging.console.log_level", "", "Options: none, error, warn, info, debug, trace")},
81 "logging.console.log_keys": {config: &config.Logging.Console.LogKeys, flagValue: fs.String("logging.console.log_keys", "", "Comma separated log keys")},
82 "logging.console.color_enabled": {config: &config.Logging.Console.ColorEnabled, flagValue: fs.Bool("logging.console.color_enabled", false, "")},
83 "logging.console.file_output": {config: &config.Logging.Console.FileOutput, flagValue: fs.String("logging.console.file_output", "", "")},
84
85 "logging.error.enabled": {config: &config.Logging.Error.Enabled, flagValue: fs.Bool("logging.error.enabled", false, "")},
86 "logging.error.rotation.max_size": {config: &config.Logging.Error.Rotation.MaxSize, flagValue: fs.Int("logging.error.rotation.max_size", 0, "")},
87 "logging.error.rotation.max_age": {config: &config.Logging.Error.Rotation.MaxAge, flagValue: fs.Int("logging.error.rotation.max_age", 0, "")},
88 "logging.error.rotation.localtime": {config: &config.Logging.Error.Rotation.LocalTime, flagValue: fs.Bool("logging.error.rotation.localtime", false, "")},
89 "logging.error.rotation.rotated_logs_size_limit": {config: &config.Logging.Error.Rotation.RotatedLogsSizeLimit, flagValue: fs.Int("logging.error.rotation.rotated_logs_size_limit", 0, "")},

Calls 1

StringMethod · 0.65