etag on save with data

This commit is contained in:
Mark Chmarny 2020-06-17 13:10:22 -07:00
parent 92c2f3d177
commit 91cdf1285d
1 changed files with 2 additions and 1 deletions

View File

@ -211,7 +211,7 @@ func (c *Client) SaveStateItem(ctx context.Context, store string, item *StateIte
}
// SaveStateData saves the data into store using default state options
func (c *Client) SaveStateData(ctx context.Context, store, key string, data []byte) error {
func (c *Client) SaveStateData(ctx context.Context, store, key, etag string, data []byte) error {
if store == "" {
return errors.New("nil store")
}
@ -225,6 +225,7 @@ func (c *Client) SaveStateData(ctx context.Context, store, key string, data []by
{
Key: key,
Value: data,
Etag: etag,
},
},
}