queue

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Queue

Go Reference Bitbucket Pipelines

Installation

go get bitbucket.org/amotus/queue

Usage


License

Licensed under Apache License, Version 2.0 LICENSE.

Documentation

Overview

Package queue provide a generic job queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job = any

Job is a type alias for a generic job.

type Queue

type Queue[J Job] interface {

	// Enqueue adds a job to the queue. Can be blocking until a slot is available.
	Enqueue(J) error

	// Dequeue returns a job from the queue. Blocking until a job is available.
	// The context can be used to set a timeout.
	Dequeue(ctx context.Context) (J, error)
}

Queue is an interface for a generic job queue.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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