{"modulePath":"github.com/GoogleCloudPlatform/cloud-sql-proxy/v2","version":"v2.28.1","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package cmd\n\n## Functions\n\n```go\nfunc Execute()\n```\nExecute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.\n\n## Types\n\n```go\ntype Command struct {\n\t*cobra.Command\n\t// contains filtered or unexported fields\n}\n```\nCommand represents an invocation of the Cloud SQL Auth Proxy.\n\n```go\nfunc NewCommand(opts ...Option) *Command\n```\nNewCommand returns a Command object representing an invocation of the proxy.\n\n```go\ntype Option func(*Command)\n```\nOption is a function that configures a Command.\n\n```go\nfunc WithAutoIP() Option\n```\nWithAutoIP enables legacy behavior of v1 and will try to connect to first IP address returned by the SQL Admin API. In most cases, this flag should not be used. Prefer default of public IP or use --private-ip instead.\\`\n\n```go\nfunc WithConnRefuseNotify(n func()) Option\n```\nWithConnRefuseNotify configures the Proxy to call the provided function when a connection is refused. The notification function is run in a goroutine.\n\n```go\nfunc WithDebugLogging() Option\n```\nWithDebugLogging configures the Proxy to log debug level messages.\n\n```go\nfunc WithDialer(d cloudsql.Dialer) Option\n```\nWithDialer configures the Command to use the provided dialer to connect to Cloud SQL instances.\n\n```go\nfunc WithFuseDir(dir string) Option\n```\nWithFuseDir mounts a directory at the path using FUSE to access Cloud SQL instances.\n\n```go\nfunc WithFuseTempDir(dir string) Option\n```\nWithFuseTempDir sets the temp directory where Unix sockets are created with FUSE\n\n```go\nfunc WithLazyRefresh() Option\n```\nWithLazyRefresh configures the Proxy to refresh connection info on an as-needed basis when the cached copy has expired.\n\n```go\nfunc WithLogger(l cloudsql.Logger) Option\n```\nWithLogger overrides the default logger.\n\n```go\nfunc WithMaxConnections(mc uint64) Option\n```\nWithMaxConnections sets the maximum allowed number of connections. Default is no limit.\n\n```go\nfunc WithQuietLogging() Option\n```\nWithQuietLogging configures the Proxy to log error messages only.\n\n```go\nfunc WithStructuredLogging() Option\n```\nWithStructuredLogging configures the Proxy to log messages using JSON.\n\n```go\nfunc WithUserAgent(agent string) Option\n```\nWithUserAgent sets additional user agents for Admin API tracking and should be a space separated list of additional user agents, e.g. cloud-sql-proxy-operator/0.0.1,other-agent/1.0.0\n\n","path":"github.com/GoogleCloudPlatform/cloud-sql-proxy/v2/cmd","name":"cmd","synopsis":"","isRedistributable":true}
