queue

package
v0.2.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

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

Usage:

import "github.com/go-vela/server/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 {

	// Publish defines a function that inserts an
	// item to the specified route in the queue.
	Publish(string, []byte) error

	// Publish defines a function that decides which
	// route a build gets placed within the queue.
	Route(*pipeline.Worker) (string, 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