Discover Packages
github.com/cosi-project/runtime
pkg
controller
runtime
internal
qruntime
internal
queue
package
Version:
v1.17.0
Opens a new window with list of versions in this module.
Published: Nov 4, 2026
License: MPL-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0 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.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package queue implements a concurrent queue of reconcile items.
Item returns a value from the queue.
Once the Value is processed, either Release() or Requeue() must be called.
func (item *Item [K, V]) Get() (K, V)
Get returns the key and value from the queue.
func (item *Item [K, V]) Key() K
Key returns just the key.
func (item *Item [K, V]) Release()
Release removes the Item from the queue.
Calling Release after Requeue is a no-op.
Requeue puts the Item back to the queue with specified backoff.
Queue is a concurrent queue of items to be reconciled.
Queue is goroutine safe, Run() method should be called
in a separate goroutine for the queue to operate.
NewQueue creates a new queue.
func (queue *Queue [K, V]) Get() <-chan *Item [K, V]
Get should never return same Item until this Item is released.
Len returns the number of items in the queue.
Len includes items which are on-hold.
func (queue *Queue [K, V]) Put(key K, value V)
Put should never block.
Put should deduplicate Items, i.e. if the same Item is Put twice,
only one Item should be returned by Get.
Run should be called in a goroutine.
Run returns when the context is canceled. You can call Run only once.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.