worker

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 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

This section is empty.

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.EmailRequest) 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