Help us shape the future of Go! Take the 2026 Go Developer Survey

concurrency

package
v0.50.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestQMI

type TestQMI struct {
	QueuedPrs    []string
	RunningQueue []string
	// Removed records the "repoKey|prKey" pairs passed to RemoveFromQueue, so
	// tests can assert whether a queue slot was released.
	Removed *[]string
	// NextInQueue is drained one key per RemoveAndTakeItemFromQueue call, so
	// tests can feed the promotion loop a sequence of candidates.
	NextInQueue *[]string
	// EchoAcquired makes AddListToRunningQueue return exactly the list it was
	// given instead of the fixed RunningQueue, so a test can observe whether a
	// dropped key is still present in the list passed on a later call.
	EchoAcquired bool
	// Passed records the list argument of every AddListToRunningQueue call, in
	// order, so a test can assert what a later retry iteration was given.
	Passed *[][]string
	// Taken counts RemoveAndTakeItemFromQueue calls, so a test can assert the
	// finished PipelineRun's slot was released at least once.
	Taken *int
	// RepeatNext makes RemoveAndTakeItemFromQueue hand out the same key
	// forever, modelling a queue that never releases a slot, so a test can
	// check the caller gives up instead of looping.
	RepeatNext string
}

func (TestQMI) AddListToRunningQueue

func (t TestQMI) AddListToRunningQueue(_ *pacv1alpha1.Repository, list []string) ([]string, error)

func (TestQMI) AddToPendingQueue

func (TestQMI) AddToPendingQueue(_ *pacv1alpha1.Repository, _ []string) error

func (TestQMI) QueuedPipelineRuns

func (t TestQMI) QueuedPipelineRuns(_ *pacv1alpha1.Repository) []string

func (TestQMI) RemoveAndTakeItemFromQueue

func (t TestQMI) RemoveAndTakeItemFromQueue(_ *pacv1alpha1.Repository, _ *tektonv1.PipelineRun) string

func (TestQMI) RemoveFromQueue

func (t TestQMI) RemoveFromQueue(repoKey, prKey string) bool

func (TestQMI) RemoveRepository

func (TestQMI) RemoveRepository(_ *pacv1alpha1.Repository)

func (TestQMI) RunningPipelineRuns

func (TestQMI) RunningPipelineRuns(_ *pacv1alpha1.Repository) []string

Jump to

Keyboard shortcuts

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