common

package
v0.0.0-...-e8355e7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IpFromRequest

func IpFromRequest(r *http.Request, trustProxy bool) net.IP

func StartEmail

func StartEmail(emailCfg *internal.EmailConfig, distCfg *internal.Config,
	dist distributors.Distributor, incomingHandler IncomingEmailHandler)

func StartWebServer

func StartWebServer(apiCfg *internal.WebApiConfig, distCfg *internal.Config,
	dist distributors.Distributor, handlers map[string]http.HandlerFunc)

StartWebServer helps distributor frontends start a Web server and configure handlers. This function does not return until it receives a SIGINT or SIGTERM. When that happens, the function calls the distributor's Shutdown method and shuts down the Web server.

Types

type IncomingEmailHandler

type IncomingEmailHandler func(msg *mail.Message, send SendFunction) error

type SendFunction

type SendFunction func(subject, body string) error

Jump to

Keyboard shortcuts

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