{"modulePath":"github.com/GoogleCloudPlatform/cloud-sql-proxy","version":"v1.14.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\ncloudsql-proxy can be used as a proxy to Cloud SQL databases. It supports connecting to many instances and authenticating via different means. Specifically, a list of instances may be provided on the command line, in GCE metadata (for VMs), or provided during connection time via a FUSE-mounted directory. See flags for a more specific explanation.\n\n## Functions\n\n```go\nfunc CreateInstanceConfigs(dir string, useFuse bool, instances []string, instancesSrc string, cl *http.Client) ([]instanceConfig, error)\n```\nCreateInstanceConfigs verifies that the parameters passed to it are valid for the proxy for the platform and system and then returns a slice of valid instanceConfig.\n\n```go\nfunc Main(timeout time.Duration)\n```\nMain executes the main function of the proxy, allowing it to be called from tests.\n\nSetting timeout to a value greater than 0 causes the process to panic after that amount of time. This is to sidestep an issue where sending a Signal to the process (via the SSH library) doesn't seem to have an effect, and closing the SSH session causes the process to get leaked. This timeout will at least cause the proxy to exit eventually.\n\n```go\nfunc WatchInstances(dir string, cfgs []instanceConfig, updates \u003c-chan string, cl *http.Client) (\u003c-chan proxy.Conn, error)\n```\nWatchInstances handles the lifecycle of local sockets used for proxying local connections.  Values received from the updates channel are interpretted as a comma-separated list of instances.  The set of sockets in 'dir' is the union of 'instances' and the most recent list from 'updates'.\n\n","path":"github.com/GoogleCloudPlatform/cloud-sql-proxy/cmd/cloud_sql_proxy","name":"main","synopsis":"cloudsql-proxy can be used as a proxy to Cloud SQL databases.","isRedistributable":true}
