server

package
v0.0.0-...-677ce44 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// SendFunction is a function to send an email.
	// If sending an email is failed, the next function is invoke.
	// i.e. func[0] -failed-> func[1] -failed-> func[2] -failed->...func[n]
	SendFuncs []sendfuncs.Send
	From      string
}

Server represents a service of sending important emails.

func New

func New(from string, sendfuncs ...sendfuncs.Send) *Server

New creates a new instance of Email Service.

func (*Server) Send

func (me *Server) Send(
	ctx context.Context,
	req *rpc.SendRequest,
) (*empty.Empty, error)

Send tries to send an email via calling the specified functions.

Jump to

Keyboard shortcuts

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