messages

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message interface {
	ReadMessage
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler
	// SetID sets the ID for a message
	SetID(id string)
	// ID is the unique identifier for a message
	ID() string
	// SetEventTime represents the timestamp of the message depending on the time characteristics of the pipeline.
	// please note that EventTime does not mean only the event time.
	// This is intended to be set once and should be immutable. Therefore, an error could be thrown if
	// an attempt is made to overwrite the time on a message.
	SetEventTime(t time.Time)
	// EventTime returns the timestamp of the message. Calling Time() on a message should give a meaningful error
	// for the user to understand that a time has not been set yet.
	EventTime() time.Time
	// Key returns the key of the message
	Key() string
	// Payload returns the payload received from the source it was read.
	Payload() []byte
}

Message is the representation of a message flowing through the numaflow

type ReadMessage

type ReadMessage interface {
	// Offset returns the offset of the message from the source it was read.
	Offset() isb.Offset
	// SetWatermark sets the watermark on a message read from a source.
	SetWatermark(watermark processor.Watermark)
	// Watermark returns the watermark for a message.
	Watermark() processor.Watermark
	// Ack acknowledges a message
	Ack()
}

ReadMessage exposes functions to set and get in-vertex stream characteristics of a NumaMessage.

Jump to

Keyboard shortcuts

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