historyconv

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApproximateEventSize

func ApproximateEventSize(event *api.HistoryEvent) int

ApproximateEventSize estimates retained history content without serializing it. Shared converters are excluded; event/detail structs use fixed allowances. Cyclic or excessively nested values fail closed above every valid byte limit.

func Collect

func Collect(
	id api.InstanceID,
	query api.HistoryQuery,
	stream func(api.HistoryEventHandler) error,
) (*api.OrchestrationHistory, error)

Collect buffers a bounded history snapshot from a streaming history read.

func NormalizeStreamRequest

func NormalizeStreamRequest(
	id api.InstanceID,
	query api.HistoryQuery,
	handler api.HistoryEventHandler,
) (api.HistoryQuery, error)

NormalizeStreamRequest validates the arguments shared by every StreamOrchestrationHistory implementation and applies query defaults.

func StreamValidated

func StreamValidated(
	query api.HistoryQuery,
	stream func(api.HistoryEventHandler) error,
	handler api.HistoryEventHandler,
) (executionID string, eventCount int, err error)

StreamValidated applies the same aggregate limits and observed execution identity checks as Collect without retaining events. stream must invoke its handler serially and stop on a handler error. Success includes validation of the end of the stream; callers must not publish output before this returns.

Types

type Converter

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

Converter converts one sequential history stream into API-owned records while preserving the current orchestration identity for legacy entity events that omit it. A Converter is not safe for concurrent use or reuse across streams.

func New

func New(converter api.DataConverter) *Converter

func (*Converter) Convert

func (c *Converter) Convert(event *protos.HistoryEvent) (*api.HistoryEvent, error)

Jump to

Keyboard shortcuts

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