Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBRepository ¶
type DBRepository struct {
*repositories.Repositories
// contains filtered or unexported fields
}
func NewDBRepository ¶
func NewDBRepository(rep *repositories.Repositories, tableName string) *DBRepository
type Event ¶
type Event struct {
ID string
EntityID string
EntityName string
Published bool
Payload any
Headers map[string]any
Exchange string
RoutingKey string
CreatedAt time.Time
UpdatedAt time.Time
}
func (*Event) GetDeliveryMode ¶
func (e *Event) GetDeliveryMode() DeliveryMode
func (*Event) GetHeaders ¶
func (*Event) GetRoutingKey ¶
func (*Event) SetHeaders ¶
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
func NewEventBus ¶
func NewEventBus(client Publisher, repository Repository) *EventBus
type HeaderRouter ¶
type HeaderRouter struct {
// contains filtered or unexported fields
}
HeaderRouter routes by a message header. By default it inspects the "type" header.
func NewHeaderRouter ¶
func NewHeaderRouter(options ...HeaderRouterOption) *HeaderRouter
NewHeaderRouter builds a header-based router.
type HeaderRouterOption ¶
type HeaderRouterOption interface {
// contains filtered or unexported methods
}
HeaderRouterOption configures a HeaderRouter.
func WithHeaderRouterKey ¶
func WithHeaderRouterKey(key string) HeaderRouterOption
WithHeaderRouterKey sets the header key used for routing.
func WithHeaderRouterMatcher ¶
func WithHeaderRouterMatcher(matcher Matcher) HeaderRouterOption
WithHeaderRouterMatcher sets a custom match function.
func WithHeaderRouterRegexpMatcher ¶
func WithHeaderRouterRegexpMatcher() HeaderRouterOption
WithHeaderRouterRegexpMatcher matches routes using regular expressions.
type Model ¶
type Publisher ¶
type Publisher interface {
Publish(publishing Publishing) error
}
type Publishing ¶
type Repository ¶
type RouterKeyRouter ¶
type RouterKeyRouter struct {
// contains filtered or unexported fields
}
RouterKeyRouter routes by the AMQP routing key.
func NewRouterKeyRouter ¶
func NewRouterKeyRouter(options ...RouterKeyRouterOption) *RouterKeyRouter
NewRouterKeyRouter builds a routing-key based router.
type RouterKeyRouterOption ¶
type RouterKeyRouterOption interface {
// contains filtered or unexported methods
}
RouterKeyRouterOption configures a RouterKeyRouter.
func WithRouterKeyMatcher ¶
func WithRouterKeyMatcher(matcher Matcher) RouterKeyRouterOption
WithRouterKeyMatcher sets a custom match function.
func WithRouterKeyRegexpMatcher ¶
func WithRouterKeyRegexpMatcher() RouterKeyRouterOption
WithRouterKeyRegexpMatcher matches routes using regular expressions.