stats

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 6 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 float64
	// Total number of messages in the database
	Messages float64
	// Total number of messages in the database
	Unread float64
	// Tags and message totals per tag
	Tags map[string]int64
	// Runtime statistics
	RuntimeStats struct {
		// Mailpit server uptime in seconds
		Uptime float64
		// Current memory usage in bytes
		Memory uint64
		// Database runtime messages deleted
		MessagesDeleted float64
		// Accepted runtime SMTP messages
		SMTPAccepted float64
		// Total runtime accepted messages size in bytes
		SMTPAcceptedSize float64
		// Rejected runtime SMTP messages
		SMTPRejected float64
		// Ignored runtime SMTP messages (when using --ignore-duplicate-ids)
		SMTPIgnored float64
	}
}

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