2020-03-07 13:32:35 +03:00
|
|
|
// Package memory provides a memory broker
|
|
|
|
package memory
|
2015-11-25 00:16:12 +00:00
|
|
|
|
|
|
|
import (
|
2020-01-31 01:26:39 +03:00
|
|
|
"github.com/micro/go-micro/v2/broker"
|
2020-03-07 13:32:35 +03:00
|
|
|
"github.com/micro/go-micro/v2/broker/nats"
|
2020-07-14 21:27:09 +01:00
|
|
|
"github.com/micro/go-micro/v2/cmd"
|
2015-11-25 00:16:12 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2016-01-02 19:25:20 +00:00
|
|
|
cmd.DefaultBrokers["nats"] = NewBroker
|
2015-11-25 00:16:12 +00:00
|
|
|
}
|
|
|
|
|
2016-03-16 10:08:10 +00:00
|
|
|
func NewBroker(opts ...broker.Option) broker.Broker {
|
2020-03-07 13:32:35 +03:00
|
|
|
return nats.NewBroker(opts...)
|
2015-11-25 00:16:12 +00:00
|
|
|
}
|