ObtainMulti is a short-cut for New(...).ObtainMulti(...).
(ctx context.Context, client RedisClient, keys []string, ttl time.Duration, opt *Options)
| 202 | |
| 203 | // ObtainMulti is a short-cut for New(...).ObtainMulti(...). |
| 204 | func ObtainMulti(ctx context.Context, client RedisClient, keys []string, ttl time.Duration, opt *Options) (*Lock, error) { |
| 205 | return New(client).ObtainMulti(ctx, keys, ttl, opt) |
| 206 | } |
| 207 | |
| 208 | // Key returns the redis key used by the lock. |
| 209 | // If the lock hold multiple key, only the first is returned. |