reportwkr

package
v0.0.0-...-485fe8d Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderOriginalSubject  = "Penguin-Original-Subject"
	HeaderOriginalSequence = "Penguin-Original-Sequence"
	HeaderDeliveries       = "Penguin-Deliveries"
	HeaderLastError        = "Penguin-Last-Error"
)

The headers of a task in the dead-letter stream.

Variables

This section is empty.

Functions

func Start

func Start(lc fx.Lifecycle, conf *appconfig.Config, deps WorkerDeps) error

Start checks that the database has the report schema of the configuration and sets the report consumer up, failing the startup if either fails, and runs its workers while the app runs. It does nothing when the report worker is disabled.

Types

type Worker

type Worker struct {
	WorkerDeps
	// contains filtered or unexported fields
}

type WorkerDeps

type WorkerDeps struct {
	fx.In
	DB                     *bun.DB
	Redis                  *redis.Client
	NatsJS                 nats.JetStreamContext
	NatsConn               *nats.Conn
	StageService           *service.Stage
	DropReportRepo         *repo.DropReport
	DropPatternRepo        *repo.DropPattern
	DropReportExtraRepo    *repo.DropReportExtra
	DropPatternElementRepo *repo.DropPatternElement
	DropInfoRepo           *repo.DropInfo
	RejectRuleRepo         *repo.RejectRule
}

Jump to

Keyboard shortcuts

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