component: Automatically determine names
This commit is contained in:
parent
10df1c3243
commit
e320bb37bb
31 changed files with 84 additions and 113 deletions
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
|
|
@ -22,12 +22,8 @@ type SQL struct {
|
|||
lazyNetwork lazy.Lazy[string]
|
||||
}
|
||||
|
||||
func (*SQL) Name() string {
|
||||
return "sql"
|
||||
}
|
||||
|
||||
func (sql *SQL) Path() string {
|
||||
return filepath.Join(sql.Core.Config.DeployRoot, "core", sql.Name())
|
||||
return filepath.Join(sql.Still.Config.DeployRoot, "core", "sql")
|
||||
}
|
||||
|
||||
func (*SQL) Context(parent component.InstallationContext) component.InstallationContext {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue