MCPcopy Create free account
hub / github.com/temporalio/temporal / DecodeHistoryEvents

Method DecodeHistoryEvents

common/codec/jsonpb.go:63–73  ·  view source on GitHub ↗

Decode HistoryEvent slice from bytes.

(data []byte)

Source from the content-addressed store, hash-verified

61
62// Decode HistoryEvent slice from bytes.
63func (e *JSONPBEncoder) DecodeHistoryEvents(data []byte) ([]*historypb.HistoryEvent, error) {
64 var historyEvents []*historypb.HistoryEvent
65 err := e.DecodeSlice(
66 data,
67 func() proto.Message {
68 historyEvent := &historypb.HistoryEvent{}
69 historyEvents = append(historyEvents, historyEvent)
70 return historyEvent
71 })
72 return historyEvents, err
73}
74
75// Decode History slice from bytes.
76func (e *JSONPBEncoder) DecodeHistories(data []byte) ([]*historypb.History, error) {

Callers 1

Calls 1

DecodeSliceMethod · 0.95

Tested by

no test coverage detected