submitqueue

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 4 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 {
	// contains filtered or unexported fields
}

Runner is a struct existing across the lifetime of a single run of the submit queue it contains a mutex to avoid being run multiple times. In fact, it even cancels runs while another one is still in progress. It contains a Gerrit object facilitating access, a log object, the configured submit queue tag and a `wipChain` (only populated if waiting for a rebase)

func NewRunner

func NewRunner(logger *log.Logger, gerrit *gerrit.Client) *Runner

NewRunner creates a new Runner struct

func (*Runner) GetWIPChain

func (r *Runner) GetWIPChain() *gerrit.Chain

GetWIPChain returns the current wipChain, if any, nil otherwiese Acquires a lock, so check with IsCurrentlyRunning first

func (*Runner) IsCurrentlyRunning

func (r *Runner) IsCurrentlyRunning() bool

IsCurrentlyRunning returns true if the runner is currently running

func (*Runner) Trigger

func (r *Runner) Trigger(fetchOnly bool) error

Trigger gets triggered periodically

Jump to

Keyboard shortcuts

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