Documentation
¶
Index ¶
Constants ¶
View Source
const BaseS3Path = "spindle/workflows"
Variables ¶
Functions ¶
func DescribeManifestError ¶
this exists because yaml.v3 reports mismatches as "cannot unmarshal !!seq into map[string]interface {}", which is kind of confusing, even if it outputs a line. so we use reflection, walk the node tree alongside the schema type, and point at the field that's actually mis-shaped.
returns nil when nothing is structurally wrong.
Types ¶
type ResourceScheduler ¶
type ResourceScheduler[R Resources[R]] struct { // contains filtered or unexported fields }
func NewResourceScheduler ¶
func NewResourceScheduler[R Resources[R]](budget, max R, agingThreshold time.Duration) *ResourceScheduler[R]
func (*ResourceScheduler[R]) Acquire ¶
func (s *ResourceScheduler[R]) Acquire(ctx context.Context, req R) (WorkflowSlot, error)
type Resources ¶
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
type SemaphoreSlotter ¶
type SemaphoreSlotter struct {
// contains filtered or unexported fields
}
limit by concurrent workflow count
func NewSemaphoreSlotter ¶
func NewSemaphoreSlotter(maxConcurrent int) *SemaphoreSlotter
func (*SemaphoreSlotter) AcquireWorkflowSlot ¶
func (a *SemaphoreSlotter) AcquireWorkflowSlot(ctx context.Context, wid models.WorkflowId, wf *models.Workflow) (WorkflowSlot, error)
type WorkflowSlot ¶
type WorkflowSlot interface {
Release()
}
type WorkflowSlotter ¶
type WorkflowSlotter interface {
AcquireWorkflowSlot(ctx context.Context, wid models.WorkflowId, wf *models.Workflow) (WorkflowSlot, error)
}
Source Files
¶
- engine.go
- manifest.go
- s3.go
- scheduler.go
- slot.go
Click to show internal directories.
Click to hide internal directories.