update go-marathon to 441a03a
in order to get the latest fixes regarding SSE subscription failover.
This commit is contained in:
parent
885b9f371c
commit
2ddae2e856
7 changed files with 162 additions and 43 deletions
10
vendor/github.com/gambol99/go-marathon/client.go
generated
vendored
10
vendor/github.com/gambol99/go-marathon/client.go
generated
vendored
|
|
@ -190,6 +190,11 @@ type httpClient struct {
|
|||
config Config
|
||||
}
|
||||
|
||||
// newRequestError signals that creating a new http.Request failed
|
||||
type newRequestError struct {
|
||||
error
|
||||
}
|
||||
|
||||
// NewClient creates a new marathon client
|
||||
// config: the configuration to use
|
||||
func NewClient(config Config) (Marathon, error) {
|
||||
|
|
@ -317,7 +322,8 @@ func (r *marathonClient) apiCall(method, path string, body, result interface{})
|
|||
}
|
||||
}
|
||||
|
||||
// buildAPIRequest creates a default API request
|
||||
// buildAPIRequest creates a default API request.
|
||||
// It fails when there is no available member in the cluster anymore or when the request can not be built.
|
||||
func (r *marathonClient) buildAPIRequest(method, path string, reader io.Reader) (request *http.Request, member string, err error) {
|
||||
// Grab a member from the cluster
|
||||
member, err = r.hosts.getMember()
|
||||
|
|
@ -328,7 +334,7 @@ func (r *marathonClient) buildAPIRequest(method, path string, reader io.Reader)
|
|||
// Build the HTTP request to Marathon
|
||||
request, err = r.client.buildMarathonRequest(method, member, path, reader)
|
||||
if err != nil {
|
||||
return nil, member, err
|
||||
return nil, member, newRequestError{err}
|
||||
}
|
||||
return request, member, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue