updated cadvisor to latest version; updated aws dependency to same as cadvisor

This commit is contained in:
David Ashpole
2017-01-18 10:55:35 -08:00
parent 6dfe5c49f6
commit 9737b41189
98 changed files with 63497 additions and 99685 deletions

View File

@@ -0,0 +1,21 @@
package protocol
import (
"io"
"io/ioutil"
"github.com/aws/aws-sdk-go/aws/request"
)
// UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body
var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody}
// UnmarshalDiscardBody is a request handler to empty a response's body and closing it.
func UnmarshalDiscardBody(r *request.Request) {
if r.HTTPResponse == nil || r.HTTPResponse.Body == nil {
return
}
io.Copy(ioutil.Discard, r.HTTPResponse.Body)
r.HTTPResponse.Body.Close()
}