Bump github.com/go-micro/plugins/v4/server/http from 1.2.1 to 1.2.2

Bumps [github.com/go-micro/plugins/v4/server/http](https://github.com/go-micro/plugins) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/go-micro/plugins/releases)
- [Commits](https://github.com/go-micro/plugins/compare/v4/logger/zap/v1.2.1...v4/server/http/v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/go-micro/plugins/v4/server/http
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2023-08-31 06:45:04 +00:00
committed by Ralf Haferkamp
parent a049a2984c
commit 59903e7662
5 changed files with 15 additions and 10 deletions

2
go.mod
View File

@@ -33,7 +33,7 @@ require (
github.com/go-micro/plugins/v4/registry/memory v1.2.0
github.com/go-micro/plugins/v4/registry/nats v1.2.2-0.20230723205323-1ada01245674
github.com/go-micro/plugins/v4/server/grpc v1.2.0
github.com/go-micro/plugins/v4/server/http v1.2.1
github.com/go-micro/plugins/v4/server/http v1.2.2
github.com/go-micro/plugins/v4/wrapper/breaker/gobreaker v1.2.0
github.com/go-micro/plugins/v4/wrapper/monitoring/prometheus v1.2.0
github.com/go-micro/plugins/v4/wrapper/trace/opentelemetry v1.2.0

4
go.sum
View File

@@ -1041,8 +1041,8 @@ github.com/go-micro/plugins/v4/registry/nats v1.2.2-0.20230723205323-1ada0124567
github.com/go-micro/plugins/v4/registry/nats v1.2.2-0.20230723205323-1ada01245674/go.mod h1:RDsrDhcjJggCzAvvUzo/Bzy68d9s9+tu0KOfofXVCog=
github.com/go-micro/plugins/v4/server/grpc v1.2.0 h1:lXfM+/0oE/u1g0hVBYsvbP4lYOYXYOmwf5qH7ghi7Cc=
github.com/go-micro/plugins/v4/server/grpc v1.2.0/go.mod h1:+Ah9Pf/vMSXxBM3fup/hc3N+zN2as3nIpcRaR4sBjnY=
github.com/go-micro/plugins/v4/server/http v1.2.1 h1:Cia924J90rgFT/4qWWvyLvN+XqEm5T9tiQyQ+GU4bOQ=
github.com/go-micro/plugins/v4/server/http v1.2.1/go.mod h1:YuAjaSPxcn3LI8j2FUsqx0Rxunrj4YwDV41Ax76rLl0=
github.com/go-micro/plugins/v4/server/http v1.2.2 h1:UK2/09AU0zV3wHELuR72TZzVU2vTUhbx9qrRGrQSIWg=
github.com/go-micro/plugins/v4/server/http v1.2.2/go.mod h1:YuAjaSPxcn3LI8j2FUsqx0Rxunrj4YwDV41Ax76rLl0=
github.com/go-micro/plugins/v4/store/nats-js v1.1.0 h1:6Fe1/eLtg8kRyaGvMILp4olYtTDGwYNBXyb1sYfAWGk=
github.com/go-micro/plugins/v4/store/nats-js v1.1.0/go.mod h1:jJf7Gm39OafZlT3s3UE2/9NIYj6OlI2fmZ4czSA3gvo=
github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230510195111-07cd57e1bc9d h1:HQoDDVyMfdkrgXNo03ZY4vzhoOXMDZVZ4SnpBDVID6E=

View File

@@ -15,7 +15,7 @@ import (
"go-micro.dev/v4/codec"
"go-micro.dev/v4/codec/jsonrpc"
"go-micro.dev/v4/codec/protorpc"
log "go-micro.dev/v4/logger"
"go-micro.dev/v4/logger"
"go-micro.dev/v4/registry"
"go-micro.dev/v4/server"
"go-micro.dev/v4/util/cmd"
@@ -178,7 +178,7 @@ func (h *httpServer) Register() error {
}
h.registerOnce.Do(func() {
log.Infof("Registering node: %s", opts.Name+"-"+opts.Id)
opts.Logger.Logf(logger.InfoLevel, "Registering node: %s", opts.Name+"-"+opts.Id)
})
if err := opts.Registry.Register(service, rOpts...); err != nil {
@@ -222,7 +222,7 @@ func (h *httpServer) Deregister() error {
opts := h.opts
h.Unlock()
log.Infof("Deregistering node: %s", opts.Name+"-"+opts.Id)
opts.Logger.Logf(logger.InfoLevel, "Deregistering node: %s", opts.Name+"-"+opts.Id)
service := serviceDef(opts)
if err := opts.Registry.Deregister(service); err != nil {
@@ -243,7 +243,7 @@ func (h *httpServer) Deregister() error {
wg.Add(1)
go func(s broker.Subscriber) {
defer wg.Done()
log.Infof("Unsubscribing from topic: %s", s.Topic())
opts.Logger.Logf(logger.InfoLevel, "Unsubscribing from topic: %s", s.Topic())
s.Unsubscribe()
}(sub)
}
@@ -278,7 +278,7 @@ func (h *httpServer) Start() error {
return err
}
log.Infof("Listening on %s", ln.Addr().String())
opts.Logger.Logf(logger.InfoLevel, "Listening on %s", ln.Addr().String())
h.Lock()
h.opts.Address = ln.Addr().String()
@@ -318,7 +318,7 @@ func (h *httpServer) Start() error {
// register self on interval
case <-t.C:
if err := h.Register(); err != nil {
log.Error("Server register error: ", err)
opts.Logger.Log(logger.ErrorLevel, "Server register error: ", err)
}
// wait for exit
case ch = <-h.exit:

View File

@@ -6,6 +6,7 @@ import (
"go-micro.dev/v4/broker"
"go-micro.dev/v4/codec"
"go-micro.dev/v4/logger"
"go-micro.dev/v4/registry"
"go-micro.dev/v4/server"
)
@@ -23,6 +24,10 @@ func newOptions(opt ...server.Option) server.Options {
o(&opts)
}
if opts.Logger == nil {
opts.Logger = logger.DefaultLogger
}
if opts.Broker == nil {
opts.Broker = broker.DefaultBroker
}

2
vendor/modules.txt vendored
View File

@@ -914,7 +914,7 @@ github.com/go-micro/plugins/v4/registry/nats
# github.com/go-micro/plugins/v4/server/grpc v1.2.0
## explicit; go 1.17
github.com/go-micro/plugins/v4/server/grpc
# github.com/go-micro/plugins/v4/server/http v1.2.1
# github.com/go-micro/plugins/v4/server/http v1.2.2
## explicit; go 1.17
github.com/go-micro/plugins/v4/server/http
# github.com/go-micro/plugins/v4/store/nats-js v1.1.0