Use environment DialContext and Listen everywhere

This commit is contained in:
Tom Wiesing 2022-09-19 12:42:33 +02:00
parent f19619ef9f
commit b0d3c686ba
No known key found for this signature in database
11 changed files with 64 additions and 30 deletions

View file

@ -7,6 +7,7 @@ import (
"github.com/FAU-CDI/wisski-distillery/internal/component"
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
"github.com/FAU-CDI/wisski-distillery/pkg/lazy"
)
type SQL struct {
@ -16,6 +17,8 @@ type SQL struct {
PollContext context.Context // context to abort polling with
PollInterval time.Duration // duration to wait for during wait
sqlNetwork lazy.Lazy[string]
}
func (SQL) Name() string {
@ -25,7 +28,7 @@ func (SQL) Name() string {
//go:embed all:sql
var resources embed.FS
func (ssh SQL) Stack(env environment.Environment) component.StackWithResources {
func (ssh *SQL) Stack(env environment.Environment) component.StackWithResources {
return ssh.ComponentBase.MakeStack(env, component.StackWithResources{
Resources: resources,
ContextPath: "sql",