mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
gofmt
This commit is contained in:
parent
33872501cf
commit
00d2d6eb4e
4
etcd.go
4
etcd.go
@ -90,9 +90,9 @@ const (
|
||||
const (
|
||||
ELECTIONTIMTOUT = 200 * time.Millisecond
|
||||
HEARTBEATTIMEOUT = 50 * time.Millisecond
|
||||
|
||||
|
||||
// Timeout for internal raft http connection
|
||||
// The original timeout for http is 45 seconds
|
||||
// The original timeout for http is 45 seconds
|
||||
// which is too long for our usage.
|
||||
HTTPTIMEOUT = time.Second
|
||||
)
|
||||
|
@ -102,12 +102,12 @@ func (t transporter) GetLeaderClientAddress() string {
|
||||
|
||||
// Send server side POST request
|
||||
func (t transporter) Post(path string, body io.Reader) (*http.Response, error) {
|
||||
resp, err := t.client.Post(t.scheme + path, "application/json", body)
|
||||
return resp, err
|
||||
resp, err := t.client.Post(t.scheme+path, "application/json", body)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
// Send server side GET request
|
||||
func (t transporter) Get(path string) (*http.Response, error) {
|
||||
resp, err := t.client.Get(t.scheme + path)
|
||||
return resp, err
|
||||
resp, err := t.client.Get(t.scheme + path)
|
||||
return resp, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user