mediatorfx

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValidationPipeline

func AddValidationPipeline(optFns ...func(options *pipelines.Options)) interface{}

func AsNotificationHandler

func AsNotificationHandler[TNotification mediator.Notification, TNotificationHandler mediator.NotificationHandler[TNotification]](f any) []interface{}

func AsPipelineBehavior

func AsPipelineBehavior(f any) interface{}

func AsRequestHandler

func AsRequestHandler[TRequest mediator.Request[TResponse], TResponse interface{}](f any) []interface{}

func NewModule added in v1.1.0

func NewModule() fx.Option

NewModule returns a new fx.Option that provides the mediator components A PublishStrategy can be provided by the user, otherwise a synchronous strategy is used

func NewPublishContainer added in v1.1.0

func NewPublishContainer(param PublisherParams) mediator.PublishContainer

func NewPublisher added in v1.2.0

func NewPublisher(container mediator.PublishContainer) mediator.Publisher

func NewSendContainer added in v1.1.0

func NewSendContainer(param SendContainerParams) mediator.SendContainer

func NewSender added in v1.2.0

func NewSender(container mediator.SendContainer) mediator.Sender

Types

type PublisherParams added in v1.2.0

type PublisherParams struct {
	fx.In

	NotificationHandlers []mediator.NotificationHandlerDefinition `group:"mediator_notification_handlers"`
	PublishStrategy      mediator.PublishStrategy                 `optional:"true"`
}

type SendContainerParams added in v1.1.0

type SendContainerParams struct {
	fx.In

	RequestHandlers []mediator.RequestHandlerDefinition `group:"mediator_request_handlers"`
	Pipelines       []mediator.PipelineBehavior         `group:"mediator_pipelines"`
}

Jump to

Keyboard shortcuts

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