Add new Consul API client MonitorRetries option

This commit is contained in:
Jeff Mitchell 2015-12-01 00:08:14 -05:00
parent 64cd58463b
commit 69b522f3ea
1 changed files with 4 additions and 3 deletions

View File

@ -206,9 +206,10 @@ func (c *ConsulBackend) List(prefix string) ([]string, error) {
func (c *ConsulBackend) LockWith(key, value string) (Lock, error) {
// Create the lock
opts := &api.LockOptions{
Key: c.path + key,
Value: []byte(value),
SessionName: "Vault Lock",
Key: c.path + key,
Value: []byte(value),
SessionName: "Vault Lock",
MonitorRetries: 5,
}
lock, err := c.client.LockOpts(opts)
if err != nil {