runner

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MPL-2.0-no-copyleft-exception Imports: 27 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Run

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

Run is a single run.

func (*Run) AfterRun added in v0.2.7

func (r *Run) AfterRun() error

AfterRun is for after the run cleanup

func (*Run) BeforeRun added in v0.2.7

func (r *Run) BeforeRun() error

BeforeRun is executed before the next run is started.

func (*Run) MountCleanup

func (r *Run) MountCleanup(m *overlay.Mount) error

MountCleanup cleans up the mount and any dirs created.

func (*Run) MountRepo

func (r *Run) MountRepo(gr *git.RepoManager) (*overlay.Mount, error)

MountRepo mounts the repo through overlayfs so we can quickly clean up the build artifacts and other work done in the container.

func (*Run) Name added in v0.2.7

func (r *Run) Name() string

Name is the name of the run

func (*Run) PullRepo

func (r *Run) PullRepo(w io.Writer) (*git.RepoManager, error)

PullRepo retrieves the repository and puts it in the right spot.

func (*Run) Run added in v0.2.7

func (r *Run) Run() (bool, error)

Run runs the CI job.

func (*Run) RunContext added in v0.2.7

func (r *Run) RunContext() *fwcontext.RunContext

RunContext returns the context for this run

func (*Run) RunDocker

func (r *Run) RunDocker() (bool, error)

RunDocker runs the queue item in docker, pulling any necessary content to do so.

func (*Run) StartCancelFunc

func (r *Run) StartCancelFunc()

StartCancelFunc launches a goroutine which waits for the cancel signal. Terminates when the run ends; one way or another. This function does not block.

func (*Run) StartLogger

func (r *Run) StartLogger(rc io.Reader)

StartLogger starts a goroutine that writes data produced on the reader to the log.

func (*Run) String added in v0.2.7

func (r *Run) String() string

type Runner

type Runner struct {
	Config *config.Config
	Docker *client.Client

	sync.Mutex
	// contains filtered or unexported fields
}

Runner encapsulates an infinite lifecycle overlay-runner.

func (*Runner) AfterRun added in v0.2.7

func (r *Runner) AfterRun(name string, runCtx *fwcontext.RunContext)

AfterRun sets the running state to false.

func (*Runner) Hostname

func (r *Runner) Hostname() string

Hostname is the reported hostname of the machine; an identifier. Not necessary for anything and insecure, just ornamental.

func (*Runner) Init

func (r *Runner) Init(ctx *fwcontext.Context) error

Init is the bootstrap of the runner.

func (*Runner) LogsvcClient

func (r *Runner) LogsvcClient(ctx *fwcontext.RunContext) *log.SubLogger

LogsvcClient returns the system log client. Must be called after configuration is initialized

func (*Runner) MakeRun added in v0.2.7

func (r *Runner) MakeRun(name string, runCtx *fwcontext.RunContext) (fw.Run, error)

MakeRun makes a new run for the framework to use.

func (*Runner) QueueClient

func (r *Runner) QueueClient() *queue.Client

QueueClient returns the queue client

func (*Runner) QueueName

func (r *Runner) QueueName() string

QueueName is the name of the queue this runner should be processing.

func (*Runner) Ready added in v0.2.7

func (r *Runner) Ready() bool

Ready indicates the runner is ready.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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