cli

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: AGPL-3.0 Imports: 69 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version describes the version of the current build.
	Version = "dev"

	// Commit describes the commit of the current build.
	Commit = "none"

	// Date describes the date of the current build.
	Date = time.Now().UTC()
)

Functions

func Execute

func Execute() error

Types

type APIStatus

type APIStatus struct {
	Message string `json:"message"`
}

type EmailJob

type EmailJob struct {
	Recipient   recipient
	Title       string
	Content     string
	RetryCount  int
	LastError   error
	LastAttempt time.Time
}

type EmailProcessor

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

func NewEmailProcessor

func NewEmailProcessor(db *bun.DB, emailClient email.Client, logger *zap.Logger, tracer trace.Tracer, cfg *config.Config, storage gulter.Storage, opts ProcessorOptions) *EmailProcessor

type ProcessMetrics

type ProcessMetrics struct {
	TotalEmails     int64
	SentEmails      int64
	FailedEmails    int64
	LastProcessedID string
	StartTime       time.Time
	EndTime         time.Time
	// contains filtered or unexported fields
}

func (*ProcessMetrics) IncrementFailed

func (m *ProcessMetrics) IncrementFailed()

func (*ProcessMetrics) IncrementSent

func (m *ProcessMetrics) IncrementSent()

type ProcessingState

type ProcessingState string
const (
	StateInit       ProcessingState = "init"
	StateProcessing ProcessingState = "processing"
	StateFailed     ProcessingState = "failed"
	StateCompleted  ProcessingState = "completed"
)

type ProcessorOptions

type ProcessorOptions struct {
	BatchSize         int
	WorkerCount       int
	MaxRetries        int
	ProcessingTimeout time.Duration
	EmailTimeout      time.Duration
	RateLimit         int
}

func DefaultProcessorOptions

func DefaultProcessorOptions() ProcessorOptions

Jump to

Keyboard shortcuts

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