shad-go/distbuild/pkg/dist/build.go

37 lines
651 B
Go
Raw Normal View History

2020-03-28 21:34:09 +00:00
package dist
import (
"context"
2020-03-29 16:03:07 +00:00
"gitlab.com/slon/shad-go/distbuild/pkg/api"
2020-03-28 21:34:09 +00:00
"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{}),
}
}
2020-03-29 16:03:07 +00:00
func (b *Build) Run(ctx context.Context, onStatusUpdate func(update api.StatusUpdate) error) error {
2020-03-28 21:34:09 +00:00
panic("implement me")
}
func (b *Build) UploadComplete() {
close(b.uploadComplete)
}