Merge branch 'master' into auth-has-role
This commit is contained in:
commit
d90cc8bf2f
@ -9,6 +9,8 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/micro/go-micro/v2/logger"
|
||||
)
|
||||
|
||||
// Request is used to construct a http request for the k8s API.
|
||||
@ -217,6 +219,7 @@ func (r *Request) Do() *Response {
|
||||
}
|
||||
}
|
||||
|
||||
logger.Debugf("[Kubernetes] %v %v", req.Method, req.URL.String())
|
||||
res, err := r.client.Do(req)
|
||||
if err != nil {
|
||||
return &Response{
|
||||
|
@ -63,7 +63,7 @@ func (s *service) genSrv() *registry.Service {
|
||||
// if it exists then use it, otherwise
|
||||
// use the address
|
||||
if len(s.opts.Advertise) > 0 {
|
||||
host, port, err = net.SplitHostPort(s.opts.Address)
|
||||
host, port, err = net.SplitHostPort(s.opts.Advertise)
|
||||
if err != nil {
|
||||
logger.Fatal(err)
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ func TestOptions(t *testing.T) {
|
||||
id = "service-id"
|
||||
version = "service-version"
|
||||
address = "service-addr:8080"
|
||||
advertise = "service-adv"
|
||||
advertise = "service-adv:8080"
|
||||
reg = memory.NewRegistry()
|
||||
registerTTL = 123 * time.Second
|
||||
registerInterval = 456 * time.Second
|
||||
|
Loading…
x
Reference in New Issue
Block a user