Skip to content

Commit

Permalink
add metadata in state get response (dapr#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyao authored Jan 7, 2021
1 parent 55e5285 commit 7a4b57c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ type StateOperation struct {

// StateItem represents a single state item.
type StateItem struct {
Key string
Value []byte
Etag string
Key string
Value []byte
Etag string
Metadata map[string]string
}

// BulkStateItem represents a single state item.
Expand Down Expand Up @@ -290,6 +291,7 @@ func (c *GRPCClient) GetStateWithConsistency(ctx context.Context, storeName, key
Etag: result.Etag,
Key: key,
Value: result.Data,
Metadata: result.Metadata,
}, nil
}

Expand Down

0 comments on commit 7a4b57c

Please sign in to comment.