mqspooler

package module
v0.0.0-...-3a40eb3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 11 Imported by: 0

README

go-mqspooler

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Fallback fallback.Config `yaml:"fallback" mapstructure:"fallback"`
	Mq       mq.Config       `yaml:"mq" mapstructure:"mq"`
}

type IBusiness

type IBusiness interface {
	ProcessMessage(ctx context.Context, message string) *core.ApplicationError
}

type IFallbackHandler

type IFallbackHandler interface {
	Handle(ctx context.Context, payload string, err *core.ApplicationError) *core.ApplicationError
}

type Metrics

type Metrics struct {
	MessageLatency    metric.Int64Histogram
	MessageInFallback metric.Int64Counter
}

type Spooler

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

func NewSpooler

func NewSpooler(mq *mq.MQConsumer, metrics *Metrics,
	lc fx.Lifecycle, business IBusiness, closer fx.Shutdowner, fallback IFallbackHandler) *Spooler

func (*Spooler) Die

func (s *Spooler) Die(err *core.ApplicationError)

func (*Spooler) Start

func (s *Spooler) Start()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳