qruntime

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package qruntime implements queue-based runtime for controllers.

Index

Constants

View Source
const DefaultConcurrency = 1

DefaultConcurrency is the default concurrency for the QController.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	controllerstate.StateAdapter
	// contains filtered or unexported fields
}

Adapter implements QRuntime interface for the QController.

func NewAdapter

func NewAdapter(
	ctrl controller.QController,
	adapterOptions adapter.Options,
) (*Adapter, error)

NewAdapter creates a new QRuntime adapter for the QController.

func (*Adapter) Run

func (adapter *Adapter) Run(ctx context.Context)

Run the QController.

func (*Adapter) WatchTrigger

func (adapter *Adapter) WatchTrigger(md *reduced.Metadata)

WatchTrigger is called by common controller runtime when there is a change in the watched resources.

type QItem

type QItem struct {
	QKey
	QValue
}

QItem is a key-value pair stored in the reconcole queue.

func NewQItem

func NewQItem(md *resource.Metadata, job QJob) QItem

NewQItem creates a new QItem.

func NewQItemFromReduced

func NewQItemFromReduced(md *reduced.Metadata, job QJob) QItem

NewQItemFromReduced creates a new QItem from a reduced Metadata.

type QJob

type QJob int

QJob is a job to be executed by the reconcile queue.

const (
	QJobReconcile QJob = iota
	QJobMap
)

QJob constants.

func (QJob) String

func (job QJob) String() string

type QKey added in v1.11.0

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

QKey is the key of the reconcile queue.

func (QKey) ID added in v1.11.0

func (item QKey) ID() resource.ID

ID implements resource.Pointer interface.

func (QKey) Namespace added in v1.11.0

func (item QKey) Namespace() resource.Namespace

Namespace implements resource.Pointer interface.

func (QKey) Type added in v1.11.0

func (item QKey) Type() resource.Type

Type implements resource.Pointer interface.

type QValue added in v1.11.0

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

QValue is the value of the reconcile queue.

func (QValue) FinalizersEmpty added in v1.11.0

func (item QValue) FinalizersEmpty() bool

FinalizersEmpty implements ReducedResourceMetadata interface.

func (QValue) Labels added in v1.11.0

func (item QValue) Labels() *resource.Labels

Labels implements ReducedResourceMetadata interface.

func (QValue) Phase added in v1.11.0

func (item QValue) Phase() resource.Phase

Phase implements ReducedResourceMetadata interface.

Directories

Path Synopsis
internal
containers
Package containers provides helper containers for qruntime.
Package containers provides helper containers for qruntime.
queue
Package queue implements a concurrent queue of reconcile items.
Package queue implements a concurrent queue of reconcile items.
timer
Package timer provides a resettable timer.
Package timer provides a resettable timer.

Jump to

Keyboard shortcuts

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