metadata

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToWatermill

func ToWatermill(metadata Metadata) message.Metadata

ToWatermill converts Protoflow metadata into a Watermill map.

Types

type Metadata

type Metadata map[string]string

Metadata represents the headers carried alongside an event.

func FromWatermill

func FromWatermill(md message.Metadata) Metadata

FromWatermill converts Watermill metadata into Protoflow metadata.

func New

func New(pairs ...string) Metadata

New constructs a Metadata map from alternating key/value pairs.

func (Metadata) Clone

func (m Metadata) Clone() Metadata

Clone returns a shallow copy of the metadata map.

func (Metadata) With

func (m Metadata) With(key, value string) Metadata

With returns a cloned metadata map containing the provided key/value pair.

func (Metadata) WithAll

func (m Metadata) WithAll(entries Metadata) Metadata

WithAll returns a cloned metadata map containing the supplied entries.

Jump to

Keyboard shortcuts

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