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