1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

cluster: add Watch support.

This commit is contained in:
Vladimir Mihailenco
2015-12-16 16:11:52 +02:00
parent 745d73395e
commit 9079a66323
5 changed files with 103 additions and 25 deletions

View File

@ -23,8 +23,8 @@ type Multi struct {
closed bool
}
// Watch marks the keys to be watched for conditional execution
// of a transaction.
// Watch creates new transaction and marks the keys to be watched
// for conditional execution of a transaction.
func (c *Client) Watch(keys ...string) (*Multi, error) {
tx := c.Multi()
if err := tx.Watch(keys...).Err(); err != nil {