Vendor integration dependencies.
This commit is contained in:
parent
dd5e3fba01
commit
55b57c736b
2451 changed files with 731611 additions and 0 deletions
21
integration/vendor/github.com/ArthurHlt/go-eureka-client/eureka/post.go
generated
vendored
Normal file
21
integration/vendor/github.com/ArthurHlt/go-eureka-client/eureka/post.go
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
package eureka
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (c *Client) RegisterInstance(appId string, instanceInfo *InstanceInfo) error {
|
||||
values := []string{"apps", appId}
|
||||
path := strings.Join(values, "/")
|
||||
instance := &Instance{
|
||||
Instance: instanceInfo,
|
||||
}
|
||||
body, err := json.Marshal(instance)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = c.Post(path, body)
|
||||
return err
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue