shad-go/distbuild/pkg/dist/build.go
2020-03-29 19:03:07 +03:00

36 lines
651 B
Go

package dist
import (
"context"
"gitlab.com/slon/shad-go/distbuild/pkg/api"
"gitlab.com/slon/shad-go/distbuild/pkg/build"
)
type Build struct {
ID build.ID
Graph *build.Graph
coordinator *Coordinator
uploadComplete chan struct{}
}
func NewBuild(graph *build.Graph, coordinator *Coordinator) *Build {
id := build.NewID()
return &Build{
ID: id,
Graph: graph,
coordinator: coordinator,
uploadComplete: make(chan struct{}),
}
}
func (b *Build) Run(ctx context.Context, onStatusUpdate func(update api.StatusUpdate) error) error {
panic("implement me")
}
func (b *Build) UploadComplete() {
close(b.uploadComplete)
}