pipeline

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PipelineRunner

func PipelineRunner(pipeline *Pipeline) context.Context

Starts the Provided Pipeline in a go routine and returns a context that will be cancelled after 240 seconds

Types

type Pipe

type Pipe struct {
	Name     string
	Cmd      *exec.Cmd
	Output   string
	OutErr   error
	Duration time.Duration
	Executed bool
	Success  bool
	// contains filtered or unexported fields
}

func NewPipe

func NewPipe(name string, cmd *exec.Cmd) *Pipe

func (*Pipe) Context

func (p *Pipe) Context(ctx context.Context) *Pipe

func (*Pipe) PostRun

func (p *Pipe) PostRun(postRun func(context.Context) error) *Pipe

func (*Pipe) Run

func (p *Pipe) Run() (string, error)

type PipeUpdate

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

type Pipeline

type Pipeline struct {
	Name      string
	Pipes     []*Pipe
	Running   chan<- *Pipe
	Curr      *Pipe
	LastRun   *Pipe
	OutputLog []string
	Err       error
	// contains filtered or unexported fields
}

func NewPipeline

func NewPipeline(title string, pipes []*Pipe, updates chan<- *Pipe) Pipeline

func (*Pipeline) Failed

func (p *Pipeline) Failed() bool

func (*Pipeline) GetDuration

func (p *Pipeline) GetDuration() time.Duration

func (*Pipeline) IsCompleted

func (p *Pipeline) IsCompleted() bool

func (*Pipeline) IsRunning

func (p *Pipeline) IsRunning() bool

func (*Pipeline) Run

func (p *Pipeline) Run() error

func (*Pipeline) Success

func (p *Pipeline) Success() bool

type Runner

type Runner struct {
	Pipeline *Pipeline
	Render   bool
	Updates  chan *Pipe
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(pipeline *Pipeline, render bool, updates chan *Pipe) *Runner

func (*Runner) Init

func (r *Runner) Init() tea.Cmd

func (*Runner) Run

func (r *Runner) Run() error

func (*Runner) RunStatic

func (r *Runner) RunStatic() tea.Cmd

func (*Runner) Update

func (r *Runner) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Runner) View

func (r *Runner) View() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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