router

package
v1.0.0-beta.151 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultRouter

func NewDefaultRouter(opts Options) (*message.Router, error)

NewDefaultRouter creates a new router with the default middlewares, in case your consumer would mandate a different setup, feel free to create your own router

func RestoreContext

func RestoreContext(h message.HandlerFunc) message.HandlerFunc

RestoreContext ensures that the original context is restored after the handler is done processing the message.

This helps with https://github.com/ThreeDotsLabs/watermill/issues/467

Types

type Options

type Options struct {
	Subscriber message.Subscriber
	Publisher  message.Publisher
	Logger     *slog.Logger

	Config config.ConsumerConfiguration
}

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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