etcdctl: add per request timeout

This commit is contained in:
Xiang Li
2015-08-11 13:33:50 -07:00
parent 1fe52e1ec3
commit e36c499d0f
11 changed files with 5 additions and 11 deletions

View File

@@ -16,6 +16,7 @@ package main
import (
"os"
"time"
"github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli"
"github.com/coreos/etcd/etcdctl/command"
@@ -37,6 +38,7 @@ func main() {
cli.StringFlag{Name: "key-file", Value: "", Usage: "identify HTTPS client using this SSL key file"},
cli.StringFlag{Name: "ca-file", Value: "", Usage: "verify certificates of HTTPS-enabled servers using this CA bundle"},
cli.StringFlag{Name: "username, u", Value: "", Usage: "provide username[:password] and prompt if password is not supplied."},
cli.DurationFlag{Name: "timeout", Value: time.Second, Usage: "connection timeout per request"},
}
app.Commands = []cli.Command{
command.NewBackupCommand(),