simonz05/godis — pull request #10 by russross (2012-05-28 23:08:19+00:00)
Title: MULTI..EXEC transactions and asynchronous Call commands

Hi,

This pull request addresses two issues:

1. When a MULTI..EXEC transaction fails because of a WATCH condition, an error is returned by ReadAll. It is difficult to test this error to see if it was due to an aborted transaction or something else. I have named the error as ErrMultiAborted, so now you can just do a check like so:

if err == redis.ErrMultiAborted { // transaction aborted, try again

2. The Call method of an AsyncClient cannot return any errors, so I removed the err return value. It calls Write in bytes.Buffer, but the docs for that method explicitly say it will never return an err (it just has the return type to match the io.Writer interface). Removing this lets careful people know it is okay to assume the call will succeed.

Thanks,

Russ