Documentation ¶
Overview ¶
Message Queue
Index ¶
- type DataBus
- func (mq *DataBus) Init(ctx context.Context, log logger.Logger) error
- func (mq *DataBus) Publish(ctx context.Context, target string, key, payload []byte) error
- func (mq *DataBus) Subscribe(ctx context.Context, target string, message query.Response) error
- func (mq *DataBus) UnSubscribe(target string) error
- func (mq *DataBus) Use(ctx context.Context, log logger.Logger) (*DataBus, error)
- type MQ
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataBus ¶
type DataBus struct {
// contains filtered or unexported fields
}
DataBus abstract type
func (*DataBus) UnSubscribe ¶
UnSubscribe - unsubscribe to a topic
type MQ ¶
type MQ interface { Init(ctx context.Context, log logger.Logger) error // Pub/Sub a pattern Publish(ctx context.Context, target string, routingKey []byte, payload []byte) error Subscribe(ctx context.Context, target string, message query.Response) error UnSubscribe(target string) error }
MQ - common interface of DataBus
Click to show internal directories.
Click to hide internal directories.