redisutil

package
v0.0.0-...-1f26eb9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRedisConnection

func InitRedisConnection(addr string) *redis.Client

func PublishArchiveTask

func PublishArchiveTask(client *redis.Client, archiveTask interface{}) error

PublishArchiveTask marshals an archiveTask into json and publishes to the 'archive' redis channel where the archive request will be handled by a subscriber/worker

func PublishEmailTask

func PublishEmailTask(client *redis.Client, emailParts EmailParts) error

func PublishSourceBucketTask

func PublishSourceBucketTask(client *redis.Client, bucket interface{}) error

func PublishTask

func PublishTask(client *redis.Client, TaskMessage interface{}, channelName string) error

PublishTask marshals a struct into json and publishes to the channelName redis channel where the task will be handled by a subscriber/worker returns number of workers that are subscribed to the channel

func SubscribeToRedisChannel

func SubscribeToRedisChannel(rdbClient *redis.Client, handlers map[string]interface{})

Types

type EmailParts

type EmailParts struct {
	To       string
	Subject  string
	BodyType string // e.g.: text/plain
	Body     string
}

EmailParts required by the mailHandler to send an email

Jump to

Keyboard shortcuts

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