broker

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextFromMapCarrier

func ContextFromMapCarrier(mapCarrier propagation.MapCarrier) context.Context

Types

type Event

type Event struct {
	Ctx context.Context //nolint:containedctx // context is used by drivers and should be passed along
	Idx uint64
	// User-defined label for incident investigation
	Label     string
	Topic     string
	Partition string
	Headers   map[string]string
	Body      []byte
}

func NewEvent

func NewEvent(
	ctx context.Context,
	topic string,
	partition string,
	headers map[string]string,
	body []byte,
) *Event

func (*Event) MapCarrier

func (e *Event) MapCarrier() propagation.MapCarrier

func (*Event) WithLabel added in v0.0.2

func (e *Event) WithLabel(label string) *Event

type Logger

type Logger interface {
	Error(msg string, keysValues ...any)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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