gomail

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gomail records messages sent through github.com/wneessen/go-mail as webpprof email entries without capturing message bodies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// DialAndSendWithContext connects and sends messages using ctx.
	DialAndSendWithContext(context.Context, ...*gomail.Msg) error
}

Client is the subset of go-mail.Client required by this integration.

func Profile

func Profile(client Client) Client

Profile instruments client with the default profiler.

func ProfileWith

func ProfileWith(profiler *webpprof.Profiler, client Client) Client

ProfileWith instruments client with an explicit profiler.

type ProfilerGoMail

type ProfilerGoMail struct{}

ProfilerGoMail implements webpprof.Integration for go-mail clients.

func New

func New() ProfilerGoMail

New creates a go-mail integration.

func (ProfilerGoMail) Name

func (ProfilerGoMail) Name() string

Name returns the integration cache namespace.

func (ProfilerGoMail) Profile

func (ProfilerGoMail) Profile(scope webpprof.Scope, client Client) Client

Profile wraps client so each send attempt is recorded. An existing wrapper for the same profiler is returned unchanged.

Jump to

Keyboard shortcuts

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