taskrunner

package
v0.0.0-...-6816ca5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Repository repository.Actions
	Ctx        context.Context
	// contains filtered or unexported fields
}

Runner for executing a task.

func (*Runner) ActiveWorkers

func (r *Runner) ActiveWorkers() int

ActiveWorkers returns a count of currently active worker jobs.

func (*Runner) Execute

func (r *Runner) Execute(ctx context.Context, l logr.Logger, description, taskID string, action func(chan string) (string, error))

Execute a task, update repository with status.

func (*Runner) Status

func (r *Runner) Status(_ context.Context, taskID string) (record repository.Record, err error)

Status returns the status record of a task.

func (*Runner) TotalWorkers

func (r *Runner) TotalWorkers() int

TotalWorkers returns a count total workers executed.

Jump to

Keyboard shortcuts

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