tflux

package module
v0.0.0-...-9cd335f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 3 Imported by: 0

README

tflux

An app that enables developers schedule task pipelines.

To do

  1. Add the ability to chain to tasks, i.e. the downstream task takes and uses the upstream task's result.

Documentation

Index

Constants

View Source
const (
	NoneStatus = iota
	QueuedStatus
	ExecutingStatus
	SuccessStatus
	UpFailedStatus
	FailedStatus
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OpResult

type OpResult struct {
	Info  string
	Error error
}

type PRQueue

type PRQueue struct {
	// contains filtered or unexported fields
}

PRQueue is the Pipeline Run Queue specific to each pipeline

func NewPRQ

func NewPRQ(dagRoot *Task) *PRQueue

func (*PRQueue) Next

func (prq *PRQueue) Next() *Task

type Pipeline

type Pipeline struct {
	// contains filtered or unexported fields
}

func NewPipeline

func NewPipeline() *Pipeline
func (pl *Pipeline) AddLink(upstream, task *Task) error

func (*Pipeline) AddStart

func (pl *Pipeline) AddStart(task *Task) error

func (*Pipeline) From

func (pl *Pipeline) From(task *Task) *linkingTask

func (*Pipeline) Queue

func (pl *Pipeline) Queue() *PRQueue

func (*Pipeline) String

func (pl *Pipeline) String() string

type Status

type Status uint

func (Status) Check

func (s Status) Check() error

func (Status) String

func (s Status) String() string

type Task

type Task struct {
	// contains filtered or unexported fields
}

func NewTask

func NewTask(name string, function func() OpResult) *Task

func (*Task) Clone

func (t *Task) Clone() *Task

func (*Task) Run

func (t *Task) Run()

func (*Task) SetStatus

func (t *Task) SetStatus(status Status)

func (*Task) String

func (t *Task) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL