package instance
import "cloud.google.com/go/cloudsqlconn/instance"
Index ¶
- type ConnName
- func ParseConnName(cn string) (ConnName, error)
- func ParseConnNameWithDomainName(cn string, dn string) (ConnName, error)
- func (c *ConnName) DomainName() string
- func (c *ConnName) HasDomainName() bool
- func (c *ConnName) Name() string
- func (c *ConnName) Project() string
- func (c *ConnName) Region() string
- func (c *ConnName) String() string
- type ConnectionNameResolver
Types ¶
type ConnName ¶
type ConnName struct {
// contains filtered or unexported fields
}
ConnName represents the "instance connection name", in the format "project:region:name".
func ParseConnName ¶
ParseConnName initializes a new ConnName struct.
func ParseConnNameWithDomainName ¶
ParseConnNameWithDomainName initializes a new ConnName struct, also setting the domain name.
func (*ConnName) DomainName ¶
DomainName returns the domain name for this instance
func (*ConnName) HasDomainName ¶
HasDomainName returns the Cloud SQL domain name
func (*ConnName) Name ¶
Name returns the Cloud SQL instance name
func (*ConnName) Project ¶
Project returns the project within which the Cloud SQL instance runs.
func (*ConnName) Region ¶
Region returns the region where the Cloud SQL instance runs.
func (*ConnName) String ¶
type ConnectionNameResolver ¶
type ConnectionNameResolver interface { // Resolve accepts a name, and returns a ConnName with the instance // connection string for the name. If the name cannot be resolved, returns // an error. Resolve(ctx context.Context, name string) (ConnName, error) }
ConnectionNameResolver resolves the connection name string into a valid instance name. This allows an application to replace the default resolver with a custom implementation.
Source Files ¶
conn_name.go
- Version
- v1.15.0 (latest)
- Published
- Feb 12, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 5 months ago –
Tools for package owners.