qruntime

package
v0.4.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 19 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 {
	// contains filtered or unexported fields
}

QItem is stored in the reconcile queue.

func NewQItem

func NewQItem(md resource.Pointer, 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.

func (QItem) ID

func (item QItem) ID() resource.ID

ID implements resource.Pointer interface.

func (QItem) Namespace

func (item QItem) Namespace() resource.Namespace

Namespace implements resource.Pointer interface.

func (QItem) Type

func (item QItem) Type() resource.Type

Type implements resource.Pointer interface.

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

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