Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
NatsAddress string `json:"nats_address"`
}
Conf is the configuration for the message queue.
type MQType ¶
type MQType string
MQType is the type of message queue.
const (
NATS MQType = "nats"
)
Message queue types
type MessageQueue ¶
type MessageQueue interface { Connect() error Close() error Publish(subject string, data interface{}) error Subscribe(subject string, insertFunc insertFunction) error UnSubscribe() error }
MessageQueue is the interface that wraps the basic message queue operations.
func NewMessageQueue ¶
func NewMessageQueue(mqType MQType) MessageQueue
NewMessageQueue returns a new message queue instance.
Click to show internal directories.
Click to hide internal directories.