processor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxRetries defines how many retries we can do for sending a message
	MaxRetries int = 30
)

Variables

View Source
var (
	// IncomingChannel Message with given msgID is incoming from a client
	IncomingChannel chan string
)

Functions

func AddToScoreboard

func AddToScoreboard(section int, msgID string)

AddToScoreboard will set the message ID in the section in the scoreboard

func IsInScoreboard

func IsInScoreboard(section int, msgID string) bool

IsInScoreboard will check if the given message ID in the section is present

func MoveToRetryQueue

func MoveToRetryQueue(msgID string)

MoveToRetryQueue moves a message (back) to retry queue and update retry info

func ProcessMessage

func ProcessMessage(msgID string)

ProcessMessage will process a message found in the processing queue.

  • If it's a local address, it will be moved to the local mailbox
  • If it's a remote address, it will be send to the remote mail server
  • If things fail, it will be moved to the retry queue, where it will be moved to processed queue later

func ProcessRetryQueue

func ProcessRetryQueue(forceRetry bool)

ProcessRetryQueue will process all mails found in the retry queue or removes them when they are expired

func ProcessStuckIncomingMessages

func ProcessStuckIncomingMessages()

ProcessStuckIncomingMessages will process stuck message found in the incoming queue.

func ProcessStuckProcessingMessages

func ProcessStuckProcessingMessages()

ProcessStuckProcessingMessages will process stuck message found in the processing queue.

func QueueIncomingMessage

func QueueIncomingMessage(msgID string)

QueueIncomingMessage queues message on the uploaded channel so it can be picked up for processing by the main loop

func RemoveFromScoreboard

func RemoveFromScoreboard(section int, msgID string)

RemoveFromScoreboard will remove the message ID from the section in the scoreboard

Types

This section is empty.

Jump to

Keyboard shortcuts

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