update broker

This commit is contained in:
Asim Aslam
2020-01-19 13:35:23 +00:00
parent e1ca40c1fc
commit 9a8c1b7ab8
4 changed files with 162 additions and 38 deletions

View File

@@ -20,6 +20,7 @@ import (
"github.com/google/uuid"
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/codec/json"
"github.com/micro/go-micro/config/cmd"
merr "github.com/micro/go-micro/errors"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/registry/cache"
@@ -29,6 +30,10 @@ import (
"golang.org/x/net/http2"
)
func init() {
cmd.DefaultBrokers["http"] = NewBroker
}
// HTTP Broker is a point to point async broker
type httpBroker struct {
id string