Documentation ¶
Overview ¶
Package messages sends jobs to a message queue. DEPRECATED.
It provides a Repository interface for generalized interactions storing and retrieving messages from a message queue, as well as a concrete type that implements that interface for RabbitMQ.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FullTextPredict ¶
type FullTextPredict struct { JobID uuid.UUID `json:"job_id"` ItemID string `json:"item_id"` FullText string `json:"full_text"` }
FullTextPredict represents a job for a file or resource passed as a message to the predictor.
func NewFullTextMsg ¶
func NewFullTextMsg(job uuid.UUID, item string, text string) *FullTextPredict
NewFullTextMsg creates a pointer to a new FullTextPredict message
func (*FullTextPredict) CSVRow ¶
func (f *FullTextPredict) CSVRow() []string
CSVRow converts a FullTextPredict message into a format for writing to a CSV.
type RabbitMQ ¶
type RabbitMQ struct { Connection *amqp.Connection Channel *amqp.Channel Queue *amqp.Queue Consumer <-chan amqp.Delivery }
RabbitMQ is a data store using RabbitMQ via its amqp interface.
func NewRabbitMQ ¶
NewRabbitMQ returns a message repo using RabbitMQ via the amqp interface. It will create (or connect to) a queue for sending a particular type of message (determined by the type of messages sent or receive from the queue) for a particular purpose (determined by the name of the queue).
func (*RabbitMQ) Close ¶
Close shutdowns the connection to the message broker and associated resources.