Vendor integration dependencies.
This commit is contained in:
parent
dd5e3fba01
commit
55b57c736b
2451 changed files with 731611 additions and 0 deletions
38
integration/vendor/github.com/ArthurHlt/go-eureka-client/eureka/get.go
generated
vendored
Normal file
38
integration/vendor/github.com/ArthurHlt/go-eureka-client/eureka/get.go
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
package eureka
|
||||
import (
|
||||
"encoding/xml"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (c *Client) GetApplications() (*Applications, error) {
|
||||
response, err := c.Get("apps");
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var applications *Applications = new(Applications)
|
||||
err = xml.Unmarshal(response.Body, applications)
|
||||
return applications, err
|
||||
}
|
||||
|
||||
func (c *Client) GetApplication(appId string) (*Application, error) {
|
||||
values := []string{"apps", appId}
|
||||
path := strings.Join(values, "/")
|
||||
response, err := c.Get(path);
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var application *Application = new(Application)
|
||||
err = xml.Unmarshal(response.Body, application)
|
||||
return application, err
|
||||
}
|
||||
func (c *Client) GetInstance(appId, instanceId string) (*InstanceInfo, error) {
|
||||
values := []string{"apps", appId, instanceId}
|
||||
path := strings.Join(values, "/")
|
||||
response, err := c.Get(path);
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var instance *InstanceInfo = new(InstanceInfo)
|
||||
err = xml.Unmarshal(response.Body, instance)
|
||||
return instance, err
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue