1400
batchID, event.EventId)
1401
}
1403
>
EventId: event.EventId,
1404
>
EventBatchId: batchID,
1405
>
}
1406
>
return proto.Marshal(ref)
1407
}
1408
1409
>
func (ms *MutableStateImpl) LoadHistoryEvent(ctx context.Context, token []byte) (*historypb.HistoryEvent, error) {
mutable_state_impl.go
1410
>
ref := &tokenspb.HistoryEventRef{}
1411
>
err := proto.Unmarshal(token, ref)
1412
>
if err != nil {
1413
return nil, err
1414
}
1415
>
branchToken, version, err := ms.getCurrentBranchTokenAndEventVersion(ref.EventId)
mutable_state_impl.go
1416
>
if err != nil {
1417
return nil, err
1418
}
1420
>
eventKey := events.EventKey{
1421
>
NamespaceID: namespace.ID(wfKey.NamespaceID),
1422
>
WorkflowID: wfKey.WorkflowID,
1423
>
RunID: wfKey.RunID,
1424
>
EventID: ref.EventId,
1425
>
Version: version,
1426
>
}
1427
>
1428
>
return ms.eventsCache.GetEvent(ctx, ms.shard.GetShardID(), eventKey, ref.EventBatchId, branchToken)
1429
}
1430