handler

package
v1.41.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterFunc

type AdapterFunc func(ctx context.Context, msg *stomp.Message) Result

func (AdapterFunc) Handle

func (a AdapterFunc) Handle(ctx context.Context, msg *stomp.Message) Result

type HandlerAdapter

type HandlerAdapter interface {
	Handle(ctx context.Context, msg *stomp.Message) Result
}

type Middleware

type Middleware func(next HandlerAdapter) HandlerAdapter

func Log

func Log(logger log.Logger) Middleware

type Result

type Result struct {
	Ack     bool
	Requeue bool
	Err     error
}

func Ack

func Ack() Result

func Requeue

func Requeue(err error) Result

type ResultHandler

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

func NewHandler

func NewHandler(logger log.Logger, adapter HandlerAdapter, middlewares ...Middleware) ResultHandler

func (ResultHandler) Handle

func (r ResultHandler) Handle(ctx context.Context, delivery *consumer.Delivery)

Jump to

Keyboard shortcuts

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