upstream

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email = email.Email

Email wrapper for package specific (github.com/jordan-wright/email) email

func NewEmailFromReader

func NewEmailFromReader(r io.Reader) (*Email, error)

NewEmailFromReader reads email from DATA stream

type EntryMeta

type EntryMeta struct {
	UID string
}

func FromContext

func FromContext(ctx context.Context) (meta *EntryMeta, ok bool)

FromContext returns the entryMeta value stored in ctx, if any.

type Forwarder

type Forwarder interface {
	Forward(ctx context.Context, mail *Email) error
}

Forwarder queues individual email

type Registry

type Registry interface {
	Forwarder
	AddForwarder(forwarder Forwarder, weight int)
	Len() int
}

Registry envelope holde of multiple upstream servers

type RegistryMap

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

func NewEmptyRegistry

func NewEmptyRegistry() *RegistryMap

NewEmptyRegistry creates empty new registry

func (*RegistryMap) AddForwarder

func (r *RegistryMap) AddForwarder(forwarder Forwarder, weight int)

func (*RegistryMap) Forward

func (r *RegistryMap) Forward(ctx context.Context, mail *Email) error

func (*RegistryMap) Len

func (r *RegistryMap) Len() int

type Server

type Server interface {
	Configure(config map[string]any) (Forwarder, error)
}

Server inits the connecion pool to the server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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