mailer

package
v0.0.0-...-1649e63 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 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 Client

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

Client represents GRPC mailer client which is responsible for sending messages to the provided subscribers. from parameter is author of the message, which is hard-coded on structure creation.

func NewClient

func NewClient(addr string, log *slog.Logger) (*Client, error)

NewClient constructs a GRPC mailer client with provided arguments. Under the hood it initializes a bunch of GRPC middleware for debugging and monitoring purposes. I.E: - retry middleware - request logger middleware If initialization of connection has failed it will return an error. NOTE: neither of parameters couldn't be nil or client will panic.

func (*Client) Send

func (c *Client) Send(ctx context.Context, html, subject string, to ...string) error

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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