Documentation ¶
Index ¶
- func Execute()
- type Command
- type Option
- func WithAutoIP() Option
- func WithConnRefuseNotify(n func()) Option
- func WithDebugLogging() Option
- func WithDialer(d cloudsql.Dialer) Option
- func WithFuseDir(dir string) Option
- func WithFuseTempDir(dir string) Option
- func WithLazyRefresh() Option
- func WithLogger(l cloudsql.Logger) Option
- func WithMaxConnections(mc uint64) Option
- func WithQuietLogging() Option
- func WithUserAgent(agent string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
Command represents an invocation of the Cloud SQL Auth Proxy.
func NewCommand ¶
NewCommand returns a Command object representing an invocation of the proxy.
type Option ¶
type Option func(*Command)
Option is a function that configures a Command.
func WithAutoIP ¶ added in v2.8.2
func WithAutoIP() Option
WithAutoIP 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.`
func WithConnRefuseNotify ¶ added in v2.14.0
func WithConnRefuseNotify(n func()) Option
WithConnRefuseNotify configures the Proxy to call the provided function when a connection is refused. The notification function is run in a goroutine.
func WithDebugLogging ¶ added in v2.11.0
func WithDebugLogging() Option
WithDebugLogging configures the Proxy to log debug level messages.
func WithDialer ¶
WithDialer configures the Command to use the provided dialer to connect to Cloud SQL instances.
func WithFuseDir ¶ added in v2.8.2
WithFuseDir mounts a directory at the path using FUSE to access Cloud SQL instances.
func WithFuseTempDir ¶ added in v2.8.2
WithFuseTempDir sets the temp directory where Unix sockets are created with FUSE
func WithLazyRefresh ¶ added in v2.11.0
func WithLazyRefresh() Option
WithLazyRefresh configures the Proxy to refresh connection info on an as-needed basis when the cached copy has expired.
func WithLogger ¶
WithLogger overrides the default logger.
func WithMaxConnections ¶ added in v2.8.2
WithMaxConnections sets the maximum allowed number of connections. Default is no limit.
func WithQuietLogging ¶ added in v2.8.2
func WithQuietLogging() Option
WithQuietLogging configures the Proxy to log error messages only.
func WithUserAgent ¶ added in v2.8.2
WithUserAgent 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