stats

package
v1.29.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package stats stores and returns Mailpit statistics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogSMTPAccepted added in v1.12.1

func LogSMTPAccepted(size int)

LogSMTPAccepted logs a successful SMTP transaction

func LogSMTPIgnored

func LogSMTPIgnored()

LogSMTPIgnored logs an ignored SMTP transaction

func LogSMTPRejected added in v1.12.1

func LogSMTPRejected()

LogSMTPRejected logs a rejected SMTP transaction

func Track

func Track()

Track will start the statistics logging in memory

Types

type AppInformation

type AppInformation struct {
	// Current Mailpit version
	Version string
	// Latest Mailpit version
	LatestVersion string
	// Database path
	Database string
	// Database size in bytes
	DatabaseSize uint64
	// Total number of messages in the database
	Messages uint64
	// Total number of messages in the database
	Unread uint64
	// Tags and message totals per tag
	Tags map[string]int64
	// Runtime statistics
	RuntimeStats struct {
		// Mailpit server uptime in seconds
		Uptime uint64
		// Current memory usage in bytes
		Memory uint64
		// Database runtime messages deleted
		MessagesDeleted uint64
		// Accepted runtime SMTP messages
		SMTPAccepted uint64
		// Total runtime accepted messages size in bytes
		SMTPAcceptedSize uint64
		// Rejected runtime SMTP messages
		SMTPRejected uint64
		// Ignored runtime SMTP messages (when using --ignore-duplicate-ids)
		SMTPIgnored uint64
	}
}

AppInformation struct swagger:model AppInformation

func Load

func Load(detectLatestVersion bool) AppInformation

Load the current statistics

Jump to

Keyboard shortcuts

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