bust/pkg/builder/builder.go
2022-10-30 18:33:59 +01:00

28 lines
383 B
Go

package builder
import (
"context"
"os"
"dagger.io/dagger"
)
type Builder struct {
Dagger *dagger.Client
}
func New(ctx context.Context) (*Builder, error) {
client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout))
if err != nil {
return nil, err
}
return &Builder{
Dagger: client,
}, nil
}
func (b *Builder) CleanUp() error {
return b.Dagger.Close()
}