queue

package
v1.22.25 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job interface {
	ID() ids.ID
	Priority() uint64
	Execute() error
}

Job represents a bootstrap job

type Queue

type Queue interface {
	// Push adds a job
	Push(Job)

	// Pop removes highest priority job
	Pop() Job

	// Len returns queue length
	Len() int

	// Has checks if job exists
	Has(ids.ID) bool
}

Queue is a priority queue for jobs

func NewQueue

func NewQueue() Queue

NewQueue creates a new queue

Jump to

Keyboard shortcuts

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