redis

package
v0.0.0-...-fec4e2b Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BLOCKING_DELAY_MSECS = 500
	MASTER_QUEUE_KEY     = "vinylretailers::queue"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type QueuePayload

type QueuePayload struct {
	JSON      []byte
	CreatedAt time.Time
}

func (*QueuePayload) Marshal

func (p *QueuePayload) Marshal() (string, error)

func (*QueuePayload) Unmarshal

func (p *QueuePayload) Unmarshal(data string) error

type RedisQueue

type RedisQueue struct {
	// contains filtered or unexported fields
}

func ConnectToQueue

func ConnectToQueue(redisServer string, redisPassword string, queueName string, create bool) (*RedisQueue, error)

func (*RedisQueue) Close

func (r *RedisQueue) Close() error

func (*RedisQueue) Dequeue

func (r *RedisQueue) Dequeue(payload any, blocking bool) (bool, error)

func (*RedisQueue) DestroyAndCleanup

func (r *RedisQueue) DestroyAndCleanup() error

func (*RedisQueue) Enqueue

func (r *RedisQueue) Enqueue(payload any) error

func (*RedisQueue) PingRedis

func (r *RedisQueue) PingRedis() (bool, error)

func (*RedisQueue) QueueLength

func (r *RedisQueue) QueueLength() (int64, error)

type ScanRequest

type ScanRequest struct {
	BatchID        int64    `json:"batchId"`
	RetailerID     int64    `json:"retailerId"`
	RetailerName   string   `json:"retailerName"`
	ArtistID       int64    `json:"artistId"`
	ArtistName     string   `json:"artistName"`
	ArtistVariants []string `json:"artistVariants"`
}

Jump to

Keyboard shortcuts

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