Skip to content

Commit

Permalink
make WorkflowStateMetadata public struct (dapr#8314)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
  • Loading branch information
famarting authored Nov 27, 2024
1 parent 776209e commit 5594351
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/runtime/wfengine/backends/actors/workflowstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type serializableWorkflowState struct {
Generation uint64
}

type workflowStateMetadata struct {
type WorkflowStateMetadata struct {
InboxLength int
HistoryLength int
Generation uint64
Expand Down Expand Up @@ -147,7 +147,7 @@ func (s *workflowState) GetSaveRequest(actorID string) (*actors.TransactionalReq

// Every time we save, we also update the metadata with information about the size of the history and inbox,
// as well as the generation of the workflow.
metadata := workflowStateMetadata{
metadata := WorkflowStateMetadata{
InboxLength: len(s.Inbox),
HistoryLength: len(s.History),
Generation: s.Generation,
Expand Down Expand Up @@ -312,7 +312,7 @@ func LoadWorkflowState(ctx context.Context, actorRuntime actors.Actors, actorID
// no state found
return nil, nil
}
var metadata workflowStateMetadata
var metadata WorkflowStateMetadata
if err = json.Unmarshal(res.Data, &metadata); err != nil {
return nil, fmt.Errorf("failed to unmarshal workflow metadata: %w", err)
}
Expand Down

0 comments on commit 5594351

Please sign in to comment.