Documentation ¶
Index ¶
- Variables
- func CollectRootErrors(err error) error
- func CollectUniqueErrors(inErrs []error) []error
- func ContextWithPoolJob(ctx context.Context, p *Pool, j *Job) context.Context
- func PoolJobFromContext(ctx context.Context) (*Pool, *Job, bool)
- func Suspend(ctx context.Context, f func())
- func SuspendE(ctx context.Context, f func() error) error
- func SuspendWaitGroup(ctx context.Context, wg *WaitGroup) error
- type Hook
- type Job
- func (j *Job) Ctx() context.Context
- func (j *Job) Done()
- func (j *Job) DoneWithErr(err error, state JobState)
- func (j *Job) Err() error
- func (j *Job) GetStatus() status.Statuser
- func (j *Job) Interactive() bool
- func (j *Job) IsDone() bool
- func (j *Job) RunHook()
- func (j *Job) Status(status status.Statuser)
- func (j *Job) Wait() <-chan struct{}
- type JobError
- type JobState
- type Pool
- type StageHook
- type WaitGroup
- func (wg *WaitGroup) Add(job *Job)
- func (wg *WaitGroup) AddChild(child *WaitGroup)
- func (wg *WaitGroup) AddSem()
- func (wg *WaitGroup) Done() <-chan struct{}
- func (wg *WaitGroup) DoneSem()
- func (wg *WaitGroup) Err() error
- func (wg *WaitGroup) IsDone() bool
- func (wg *WaitGroup) Jobs() []*Job
- func (wg *WaitGroup) Remove(job *Job)
- func (wg *WaitGroup) RemoveChild(child *WaitGroup)
- func (wg *WaitGroup) TransitiveCount() WaitGroupStats
- func (wg *WaitGroup) TransitiveDo(f func(j *Job))
- type WaitGroupStats
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPending = errors.New("pending")
View Source
var ErrSemPending = fmt.Errorf("sem is > 0: %w", ErrPending)
Functions ¶
func CollectRootErrors ¶
func CollectUniqueErrors ¶
func ContextWithPoolJob ¶
Types ¶
type Job ¶
type Job struct { Name string ID uint64 Deps *WaitGroup Do func(w *Worker, ctx context.Context) error State JobState Hook Hook TimeScheduled time.Time TimeQueued time.Time TimeStart time.Time TimeEnd time.Time // contains filtered or unexported fields }
func (*Job) DoneWithErr ¶
func (*Job) Interactive ¶
type JobError ¶
type StageHook ¶
type WaitGroup ¶
type WaitGroup struct {
// contains filtered or unexported fields
}
func WaitGroupChan ¶
func WaitGroupJob ¶
func WaitGroupOr ¶
func (*WaitGroup) RemoveChild ¶
func (*WaitGroup) TransitiveCount ¶
func (wg *WaitGroup) TransitiveCount() WaitGroupStats
func (*WaitGroup) TransitiveDo ¶
type WaitGroupStats ¶
Click to show internal directories.
Click to hide internal directories.