redis

package
v0.23.4 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

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

Usage:

import "github.com/go-vela/server/queue/redis"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...ClientOpt) (*client, error)

New returns a Queue implementation that integrates with a Redis queue instance.

func NewTest

func NewTest(signingPrivateKey, signingPublicKey string, channels ...string) (*client, error)

NewTest returns a Queue implementation that integrates with a local Redis instance.

It's possible to override this with env variables, which gets used as a part of integration testing with the different supported backends.

This function is intended for running tests only.

Types

type ClientOpt added in v0.11.0

type ClientOpt func(*client) error

ClientOpt represents a configuration option to initialize the queue client for Redis.

func WithAddress added in v0.11.0

func WithAddress(address string) ClientOpt

WithAddress sets the address in the queue client for Redis.

func WithChannels added in v0.11.0

func WithChannels(channels ...string) ClientOpt

WithChannels sets the channels in the queue client for Redis.

func WithCluster added in v0.11.0

func WithCluster(cluster bool) ClientOpt

WithCluster sets the clustering mode in the queue client for Redis.

func WithPrivateKey added in v0.21.0

func WithPrivateKey(key string) ClientOpt

WithPrivateKey sets the private key in the queue client for Redis.

func WithPublicKey added in v0.21.0

func WithPublicKey(key string) ClientOpt

WithPublicKey sets the public key in the queue client for Redis.

func WithTimeout added in v0.11.0

func WithTimeout(timeout time.Duration) ClientOpt

WithTimeout sets the timeout in the queue client for Redis.

Jump to

Keyboard shortcuts

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