github.com/metux/go-metabuild@v0.0.0-20240118143255-d9ed5ab697f9/util/jobs/interface.go (about) 1 package jobs 2 3 type JobId = string 4 5 type Job interface { 6 // called on adding a job to a runner (not parallelized) 7 JobPrepare(id JobId) error 8 9 // run the job (potentially parallelized) 10 JobRun() error 11 12 JobId() JobId 13 JobDepends() []JobId 14 JobSub() ([]Job, error) 15 } 16 17 type JobMap = map[JobId]Job