Documentation
¶
Index ¶
- func ApproximateEventSize(event *api.HistoryEvent) int
- func Collect(id api.InstanceID, query api.HistoryQuery, ...) (*api.OrchestrationHistory, error)
- func NormalizeStreamRequest(id api.InstanceID, query api.HistoryQuery, handler api.HistoryEventHandler) (api.HistoryQuery, error)
- func StreamValidated(query api.HistoryQuery, stream func(api.HistoryEventHandler) error, ...) (executionID string, eventCount int, err error)
- type Converter
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)