示例#1
0
文件: appengine.go 项目: matm/gobuild
func init() {
	if dials == nil {
		dials = make(map[string]dialFunc)
	}
	dials["cloudsql"] = func(cfg *config) (net.Conn, error) {
		return cloudsql.Dial(cfg.addr)
	}
}
示例#2
0
func connect(instance string) (net.Conn, error) {
	return cloudsql.Dial(instance)
}
示例#3
0
func init() {
	SetDialer(func(proto, laddr, raddr, user, dbname string, timeout time.Duration) (net.Conn, error) {
		return cloudsql.Dial(raddr)
	})
}