publisher

package
v0.0.59 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCloudEventOptions added in v0.0.55

func ApplyCloudEventOptions(ctx context.Context, event *event.Event, opts ...Option) context.Context

func ApplyCloudEventsPubSubOrderingKey added in v0.0.45

func ApplyCloudEventsPubSubOrderingKey(ctx context.Context, opts ...Option) context.Context

ApplyCloudEventsPubSubOrderingKey extracts a OrderingKey from Options and stores OrderingKey in Context for CloudEvents PubSub.

Types

type Option

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

func WithExtensions added in v0.0.55

func WithExtensions(extensions map[string]any) Option

func WithOrderingKey

func WithOrderingKey(orderingKey string) Option

type PanicPublisher added in v0.0.49

type PanicPublisher[EV any] struct {
	// contains filtered or unexported fields
}

PanicPublisher wraps a Publisher. Panics if publishing fails.

func NewPanicPublisher added in v0.0.49

func NewPanicPublisher[EV any](er *errorreporting.Client, base Publisher[EV]) *PanicPublisher[EV]

func (*PanicPublisher[EV]) PublishWithNACKPanic added in v0.0.49

func (p *PanicPublisher[EV]) PublishWithNACKPanic(ctx context.Context, event *EV, opts ...Option) errorreports.Error

type PublishError added in v0.0.48

type PublishError interface {
	errorreports.Error

	// IsACK returns true if recipient acknowledged the event.
	IsACK() bool
}

type Publisher

type Publisher[EV any] interface {
	// Publish publishes an Event to Target.
	Publish(ctx context.Context, event *EV, opts ...Option) PublishError
}

Jump to

Keyboard shortcuts

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