queue

package
v0.0.0-...-ac6a2c4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MaintenanceQueue

type MaintenanceQueue interface {
	// Enqueue enqueues a hostname into the maintenance queue
	Enqueue(hostname string) error
	// Dequeue dequeues a hostname from the maintenance queue
	Dequeue(maxWaitTime time.Duration) (string, error)
	// Length returns the length of maintenance queue at any time
	Length() int
	// Clear contents of maintenance queue
	Clear()
}

MaintenanceQueue is the interface for maintenance queue.

func NewMaintenanceQueue

func NewMaintenanceQueue() MaintenanceQueue

NewMaintenanceQueue returns an instance of the maintenance queue

type TaskQueue

type TaskQueue interface {
	// Enqueue enqueues a list of hostnames into the task eviction queue.
	Enqueue(taskIDs []string) error
	// Dequeue dequeues a hostname from the task eviction queue.
	Dequeue(maxWaitTime time.Duration) (string, error)
	// Length returns the length of task eviction queue at that point in time.
	Length() int
	// Clear contents of task eviction queue.
	Clear()
}

TaskQueue is the interface for task queue.

func NewTaskQueue

func NewTaskQueue(taskQueueName string) TaskQueue

NewTaskQueue returns an instance of the task queue.

Jump to

Keyboard shortcuts

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