Add request timeout

This commit is contained in:
Asim
2016-01-03 21:14:33 +00:00
parent 1037663acf
commit 332a229169
3 changed files with 73 additions and 27 deletions

View File

@@ -22,6 +22,8 @@ supported.
package client
import (
"time"
"golang.org/x/net/context"
)
@@ -71,6 +73,9 @@ type RequestOption func(*RequestOptions)
var (
DefaultClient Client = newRpcClient()
DefaultRetries = 1
DefaultRequestTimeout = time.Second * 5
)
// Makes a synchronous call to a service using the default client