publisher

package
v1.1.0-beta.17 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module returns fx module for initialization of event publisher middleware. Which depends on event wrapper provider module.

The module is only loaded once.

func NewEventPublisher

func NewEventPublisher(options *Options, events *provider.EventWrapperProvider) cloudevents.Middleware

NewEventPublisher creates an event publisher middleware.

Types

type EventPublisher

type EventPublisher struct {
	cloudevents.UnimplementedMiddleware
	// contains filtered or unexported fields
}

EventPublisher represents an event publisher middleware.

func (*EventPublisher) AfterAll

func (p *EventPublisher) AfterAll(ctx context.Context, inouts []*cloudevents.InOut) (context.Context, error)

AfterAll publishes all output events after processing all handlers.

type Options

type Options struct {
	Enabled bool
	Success struct {
		Enabled bool
	}
	Error struct {
		Enabled bool
		Topic   string
	}
}

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

Jump to

Keyboard shortcuts

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