queue

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package queue provides the ability for Vela to integrate with different supported Queue backends.

Usage:

import "github.com/go-vela/worker/queue"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToContext

func ToContext(c Setter, q Service)

ToContext adds the queue Service to this context if it supports the Setter interface.

Types

type Service

type Service interface {
	// Pull defines a function that pops an item off the queue.
	Pull(string) (*types.Item, error)
}

Service represents the interface for Vela integrating with the different supported Queue backends.

func FromContext

func FromContext(c context.Context) Service

FromContext returns the queue Service associated with this context.

type Setter

type Setter interface {
	Set(string, interface{})
}

Setter defines a context that enables setting values.

Directories

Path Synopsis
Package redis provides the ability for Vela to integrate with a Redis server as a queue backend.
Package redis provides the ability for Vela to integrate with a Redis server as a queue backend.

Jump to

Keyboard shortcuts

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