worker

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package worker contains the functionality for the background worker process. It starts a background service that polls every minute for scheduled campaigns to be launched. If a campaign is found, it gathers the maillogs associated with the campaign and sends them to the mailer package to be processed.

Index

Constants

This section is empty.

Variables

Logger is the logger for the worker

Functions

This section is empty.

Types

type Worker

type Worker struct{}

Worker is the background worker that handles watching for new campaigns and sending emails appropriately.

func New

func New() *Worker

New creates a new worker object to handle the creation of campaigns

func (*Worker) LaunchCampaign added in v0.5.0

func (w *Worker) LaunchCampaign(c models.Campaign)

LaunchCampaign starts a campaign

func (*Worker) SendTestEmail added in v0.5.0

func (w *Worker) SendTestEmail(s *models.SendTestEmailRequest) error

SendTestEmail sends a test email

func (*Worker) Start

func (w *Worker) Start()

Start launches the worker to poll the database every minute for any pending maillogs that need to be processed.

Jump to

Keyboard shortcuts

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