Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f812c2f2
Commit
f812c2f2
authored
Jan 18, 2017
by
Alexander Block
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update go-autorest library to v7.2.3
To include
https://github.com/Azure/go-autorest/pull/107
Improves
https://github.com/kubernetes/kubernetes/issues/35180
parent
fe69dcf8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
15 deletions
+27
-15
Godeps.json
Godeps/Godeps.json
+10
-10
token.go
vendor/github.com/Azure/go-autorest/autorest/azure/token.go
+1
-1
error.go
vendor/github.com/Azure/go-autorest/autorest/error.go
+3
-0
responder.go
vendor/github.com/Azure/go-autorest/autorest/responder.go
+10
-3
sender.go
vendor/github.com/Azure/go-autorest/autorest/sender.go
+3
-1
No files found.
Godeps/Godeps.json
View file @
f812c2f2
...
@@ -63,28 +63,28 @@
...
@@ -63,28 +63,28 @@
},
},
{
{
"ImportPath"
:
"github.com/Azure/go-autorest/autorest"
,
"ImportPath"
:
"github.com/Azure/go-autorest/autorest"
,
"Comment"
:
"v7.2.
2-8-ge0c77ec
"
,
"Comment"
:
"v7.2.
3
"
,
"Rev"
:
"
e0c77ecbe74311e03f2a629834d2110f031f1453
"
"Rev"
:
"
d7c034a8af24eda120dd6460bfcd6d9ed14e43ca
"
},
},
{
{
"ImportPath"
:
"github.com/Azure/go-autorest/autorest/azure"
,
"ImportPath"
:
"github.com/Azure/go-autorest/autorest/azure"
,
"Comment"
:
"v7.2.
2-8-ge0c77ec
"
,
"Comment"
:
"v7.2.
3
"
,
"Rev"
:
"
e0c77ecbe74311e03f2a629834d2110f031f1453
"
"Rev"
:
"
d7c034a8af24eda120dd6460bfcd6d9ed14e43ca
"
},
},
{
{
"ImportPath"
:
"github.com/Azure/go-autorest/autorest/date"
,
"ImportPath"
:
"github.com/Azure/go-autorest/autorest/date"
,
"Comment"
:
"v7.2.
2-8-ge0c77ec
"
,
"Comment"
:
"v7.2.
3
"
,
"Rev"
:
"
e0c77ecbe74311e03f2a629834d2110f031f1453
"
"Rev"
:
"
d7c034a8af24eda120dd6460bfcd6d9ed14e43ca
"
},
},
{
{
"ImportPath"
:
"github.com/Azure/go-autorest/autorest/to"
,
"ImportPath"
:
"github.com/Azure/go-autorest/autorest/to"
,
"Comment"
:
"v7.2.
2-8-ge0c77ec
"
,
"Comment"
:
"v7.2.
3
"
,
"Rev"
:
"
e0c77ecbe74311e03f2a629834d2110f031f1453
"
"Rev"
:
"
d7c034a8af24eda120dd6460bfcd6d9ed14e43ca
"
},
},
{
{
"ImportPath"
:
"github.com/Azure/go-autorest/autorest/validation"
,
"ImportPath"
:
"github.com/Azure/go-autorest/autorest/validation"
,
"Comment"
:
"v7.2.
2-8-ge0c77ec
"
,
"Comment"
:
"v7.2.
3
"
,
"Rev"
:
"
e0c77ecbe74311e03f2a629834d2110f031f1453
"
"Rev"
:
"
d7c034a8af24eda120dd6460bfcd6d9ed14e43ca
"
},
},
{
{
"ImportPath"
:
"github.com/MakeNowJust/heredoc"
,
"ImportPath"
:
"github.com/MakeNowJust/heredoc"
,
...
...
vendor/github.com/Azure/go-autorest/autorest/azure/token.go
View file @
f812c2f2
...
@@ -302,7 +302,7 @@ func (spt *ServicePrincipalToken) refreshInternal(resource string) error {
...
@@ -302,7 +302,7 @@ func (spt *ServicePrincipalToken) refreshInternal(resource string) error {
var
newToken
Token
var
newToken
Token
err
=
autorest
.
Respond
(
resp
,
err
=
autorest
.
Respond
(
resp
,
autorest
.
WithErrorUnless
OK
(
),
autorest
.
WithErrorUnless
StatusCode
(
http
.
StatusOK
),
autorest
.
ByUnmarshallingJSON
(
&
newToken
),
autorest
.
ByUnmarshallingJSON
(
&
newToken
),
autorest
.
ByClosing
())
autorest
.
ByClosing
())
if
err
!=
nil
{
if
err
!=
nil
{
...
...
vendor/github.com/Azure/go-autorest/autorest/error.go
View file @
f812c2f2
...
@@ -28,6 +28,9 @@ type DetailedError struct {
...
@@ -28,6 +28,9 @@ type DetailedError struct {
// Message is the error message.
// Message is the error message.
Message
string
Message
string
// Service Error is the response body of failed API in bytes
ServiceError
[]
byte
}
}
// NewError creates a new Error conforming object from the passed packageType, method, and
// NewError creates a new Error conforming object from the passed packageType, method, and
...
...
vendor/github.com/Azure/go-autorest/autorest/responder.go
View file @
f812c2f2
...
@@ -165,17 +165,24 @@ func ByUnmarshallingXML(v interface{}) RespondDecorator {
...
@@ -165,17 +165,24 @@ func ByUnmarshallingXML(v interface{}) RespondDecorator {
}
}
// WithErrorUnlessStatusCode returns a RespondDecorator that emits an error unless the response
// WithErrorUnlessStatusCode returns a RespondDecorator that emits an error unless the response
// StatusCode is among the set passed.
Since these are artificial errors, the response body
// StatusCode is among the set passed.
On error, response body is fully read into a buffer and
//
may still require closing
.
//
presented in the returned error, as well as in the response body
.
func
WithErrorUnlessStatusCode
(
codes
...
int
)
RespondDecorator
{
func
WithErrorUnlessStatusCode
(
codes
...
int
)
RespondDecorator
{
return
func
(
r
Responder
)
Responder
{
return
func
(
r
Responder
)
Responder
{
return
ResponderFunc
(
func
(
resp
*
http
.
Response
)
error
{
return
ResponderFunc
(
func
(
resp
*
http
.
Response
)
error
{
err
:=
r
.
Respond
(
resp
)
err
:=
r
.
Respond
(
resp
)
if
err
==
nil
&&
!
ResponseHasStatusCode
(
resp
,
codes
...
)
{
if
err
==
nil
&&
!
ResponseHasStatusCode
(
resp
,
codes
...
)
{
err
=
NewErrorWithResponse
(
"autorest"
,
"WithErrorUnlessStatusCode"
,
resp
,
"%v %v failed with %s"
,
derr
:
=
NewErrorWithResponse
(
"autorest"
,
"WithErrorUnlessStatusCode"
,
resp
,
"%v %v failed with %s"
,
resp
.
Request
.
Method
,
resp
.
Request
.
Method
,
resp
.
Request
.
URL
,
resp
.
Request
.
URL
,
resp
.
Status
)
resp
.
Status
)
if
resp
.
Body
!=
nil
{
defer
resp
.
Body
.
Close
()
b
,
_
:=
ioutil
.
ReadAll
(
resp
.
Body
)
derr
.
ServiceError
=
b
resp
.
Body
=
ioutil
.
NopCloser
(
bytes
.
NewReader
(
b
))
}
err
=
derr
}
}
return
err
return
err
})
})
...
...
vendor/github.com/Azure/go-autorest/autorest/sender.go
View file @
f812c2f2
...
@@ -73,7 +73,7 @@ func SendWithSender(s Sender, r *http.Request, decorators ...SendDecorator) (*ht
...
@@ -73,7 +73,7 @@ func SendWithSender(s Sender, r *http.Request, decorators ...SendDecorator) (*ht
func
AfterDelay
(
d
time
.
Duration
)
SendDecorator
{
func
AfterDelay
(
d
time
.
Duration
)
SendDecorator
{
return
func
(
s
Sender
)
Sender
{
return
func
(
s
Sender
)
Sender
{
return
SenderFunc
(
func
(
r
*
http
.
Request
)
(
*
http
.
Response
,
error
)
{
return
SenderFunc
(
func
(
r
*
http
.
Request
)
(
*
http
.
Response
,
error
)
{
if
!
DelayForBackoff
(
d
,
1
,
r
.
Cancel
)
{
if
!
DelayForBackoff
(
d
,
0
,
r
.
Cancel
)
{
return
nil
,
fmt
.
Errorf
(
"autorest: AfterDelay canceled before full delay"
)
return
nil
,
fmt
.
Errorf
(
"autorest: AfterDelay canceled before full delay"
)
}
}
return
s
.
Do
(
r
)
return
s
.
Do
(
r
)
...
@@ -257,6 +257,8 @@ func WithLogging(logger *log.Logger) SendDecorator {
...
@@ -257,6 +257,8 @@ func WithLogging(logger *log.Logger) SendDecorator {
// passed attempt (i.e., an exponential backoff delay). Backoff duration is in seconds and can set
// passed attempt (i.e., an exponential backoff delay). Backoff duration is in seconds and can set
// to zero for no delay. The delay may be canceled by closing the passed channel. If terminated early,
// to zero for no delay. The delay may be canceled by closing the passed channel. If terminated early,
// returns false.
// returns false.
// Note: Passing attempt 1 will result in doubling "backoff" duration. Treat this as a zero-based attempt
// count.
func
DelayForBackoff
(
backoff
time
.
Duration
,
attempt
int
,
cancel
<-
chan
struct
{})
bool
{
func
DelayForBackoff
(
backoff
time
.
Duration
,
attempt
int
,
cancel
<-
chan
struct
{})
bool
{
select
{
select
{
case
<-
time
.
After
(
time
.
Duration
(
backoff
.
Seconds
()
*
math
.
Pow
(
2
,
float64
(
attempt
)))
*
time
.
Second
)
:
case
<-
time
.
After
(
time
.
Duration
(
backoff
.
Seconds
()
*
math
.
Pow
(
2
,
float64
(
attempt
)))
*
time
.
Second
)
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment