distributors

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomBytes

func RandomBytes(n int) []byte

RandomBytes provides N secure randomized bytes. Stops the program on failure.

Types

type Distributor

type Distributor interface {
	// Progress(ProgressFunction)
	SetLogger(loggers.Logger)
	// When writing your own distributor, do not forget to set m.Current for each mail item!
	Send(l *loaders.Message, r renderers.Renderer, p providers.Provider, test bool) error
	Close() error
}

Distributor manages queues and workers to deliver mail.

type LockingSynchronousBufferingDistributor

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

LockingSynchronousBufferingDistributor sends mail from one thread using memory buffer and prevents double deliveries using a hash lock file.

func (*LockingSynchronousBufferingDistributor) Close

Close wraps up operations and closes handle.

func (*LockingSynchronousBufferingDistributor) Send

Send delivers mail to all potential recepients.

func (*LockingSynchronousBufferingDistributor) SetLogger

Jump to

Keyboard shortcuts

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