Documentation
¶
Overview ¶
Package workerpool is a generated GoMock package.
Index ¶
- func TimeoutErrorKey() string
- type DAG
- type DAGResult
- func (r DAGResult) Blockers(dag DAG, job string) []string
- func (r DAGResult) BoundarySubtrees(dag DAG) []string
- func (r DAGResult) FirstError() error
- func (r DAGResult) FirstInProgress() *JobResult
- func (r DAGResult) Frontiers(dag DAG) Frontiers
- func (r DAGResult) IsFailed() bool
- func (r DAGResult) IsNotReady() bool
- func (r DAGResult) IsNotSuccessful() bool
- func (r DAGResult) IsReady() bool
- func (r DAGResult) IsSuccessful() bool
- func (r DAGResult) IsTimeouted() bool
- func (r DAGResult) Subtree(dag DAG, root string) []string
- func (r DAGResult) TimeoutError(deadline time.Duration)
- type FrontierItem
- type Frontiers
- type Job
- type JobResult
- func (j *JobResult) Fail(err error)
- func (j *JobResult) IsFailed() bool
- func (j *JobResult) IsInProgress() bool
- func (j *JobResult) IsNotSkipped() bool
- func (j *JobResult) IsSkipped() bool
- func (j *JobResult) IsSuccessfull() bool
- func (j *JobResult) NotReady()
- func (j *JobResult) Skip()
- func (j *JobResult) Success()
- type JobStatus
- type MockJob
- type MockJobMockRecorder
- type Result
- type WorkerPool
- type WorkerPoolImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TimeoutErrorKey ¶ added in v1.1.0
func TimeoutErrorKey() string
Types ¶
type DAGResult ¶
DAGResult contains results from orchestrator. collection is not touched from particular jobs so as resource can't be thread safe (only orchestrator can it)
func (DAGResult) Blockers ¶ added in v1.1.0
Blockers returns direct deps that are not successful (so they block this job).
func (DAGResult) BoundarySubtrees ¶ added in v1.1.0
BoundarySubtrees returns jobs that are successful but have a not-yet-successful job somewhere in their successor subtree.
func (DAGResult) FirstError ¶
func (DAGResult) FirstInProgress ¶
func (DAGResult) IsNotReady ¶
func (DAGResult) IsNotSuccessful ¶
func (DAGResult) IsSuccessful ¶
func (DAGResult) IsTimeouted ¶
func (DAGResult) Subtree ¶ added in v1.1.0
Subtree returns all successors reachable from "root" (including root).
func (DAGResult) TimeoutError ¶
type FrontierItem ¶ added in v1.1.0
type FrontierItem struct {
Job string
Status JobStatus
BlockedBy []string
Subtree []string // optional: successors that depend on this job
// contains filtered or unexported fields
}
FrontierItem is item in the workflow where work stay
func (*FrontierItem) IsBlocked ¶ added in v1.1.0
func (f *FrontierItem) IsBlocked() bool
type Frontiers ¶ added in v1.1.0
type Frontiers []*FrontierItem
func (Frontiers) AsMap ¶ added in v1.1.0
func (f Frontiers) AsMap() map[string]*FrontierItem
type JobResult ¶
func (*JobResult) IsInProgress ¶
func (*JobResult) IsNotSkipped ¶
func (*JobResult) IsSuccessfull ¶
type MockJob ¶
type MockJob struct {
// contains filtered or unexported fields
}
MockJob is a mock of Job interface.
func NewMockJob ¶
func NewMockJob(ctrl *gomock.Controller) *MockJob
NewMockJob creates a new mock instance.
func (*MockJob) EXPECT ¶
func (m *MockJob) EXPECT() *MockJobMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockJobMockRecorder ¶
type MockJobMockRecorder struct {
// contains filtered or unexported fields
}
MockJobMockRecorder is the mock recorder for MockJob.
func (*MockJobMockRecorder) Do ¶
func (mr *MockJobMockRecorder) Do(ctx any) *gomock.Call
Do indicates an expected call of Do.
func (*MockJobMockRecorder) String ¶
func (mr *MockJobMockRecorder) String() *gomock.Call
String indicates an expected call of String.
type WorkerPool ¶
type WorkerPool interface {
Start() DAGResult
}
type WorkerPoolImpl ¶
type WorkerPoolImpl struct {
// contains filtered or unexported fields
}
func (*WorkerPoolImpl) Start ¶
func (w *WorkerPoolImpl) Start() DAGResult