stats

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 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 LogSMTPError

func LogSMTPError()

LogSMTPError logs a failed SMTP transaction

func LogSMTPIgnored

func LogSMTPIgnored()

LogSMTPIgnored logs an ignored SMTP transaction

func LogSMTPReceived

func LogSMTPReceived(size int)

LogSMTPReceived logs a successfully 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 int64
	// Total number of messages in the database
	Messages int
	// Total number of messages in the database
	Unread int
	// Tags and message totals per tag
	Tags map[string]int64
	// Runtime statistics
	RuntimeStats struct {
		// Mailpit server uptime in seconds
		Uptime int
		// Current memory usage in bytes
		Memory uint64
		// Messages deleted
		MessagesDeleted int
		// SMTP messages received via since run
		SMTPReceived int
		// Total size in bytes of received messages since run
		SMTPReceivedSize int
		// SMTP errors since run
		SMTPErrors int
		// SMTP messages ignored since run (duplicate IDs)
		SMTPIgnored int
	}
}

AppInformation struct swagger:model AppInformation

func Load

func Load() AppInformation

Load the current statistics

Jump to

Keyboard shortcuts

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