Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMessageBroker ¶
type IMessageBroker interface {
Publish(ctx context.Context, channel string, payload interface{}) error
Subscribe(ctx context.Context, channel string, callback func(channel string, payload string)) func() error
}
func GetBroker ¶
func GetBroker() (IMessageBroker, error)
func Init ¶
func Init(options ...MessageBrokerOptions) (IMessageBroker, error)
type MessageBrokerDriver ¶ added in v1.8.12
type MessageBrokerDriver string
const (
MessageBrokerDriverRedis MessageBrokerDriver = "redis"
)
type MessageBrokerOptions ¶ added in v1.8.12
type MessageBrokerOptions struct {
Db int
Driver MessageBrokerDriver
}
Click to show internal directories.
Click to hide internal directories.