component: Automatically determine names

This commit is contained in:
Tom Wiesing 2022-10-17 20:39:53 +02:00
parent 10df1c3243
commit e320bb37bb
No known key found for this signature in database
31 changed files with 84 additions and 113 deletions

View file

@ -133,7 +133,7 @@ func (sql *SQL) network() string {
// this seems like a bit of a hack, but it works for now.
name = fmt.Sprintf("sql-network-%d", atomic.AddUint64(&proxyNameCounter, 1))
mysqldriver.RegisterDialContext(name, func(ctx context.Context, addr string) (net.Conn, error) {
return sql.Core.Environment.DialContext(ctx, network, addr)
return sql.Still.Environment.DialContext(ctx, network, addr)
})
return
})