Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 879 Bytes

README.md

File metadata and controls

34 lines (20 loc) · 879 Bytes

Package to publish jobs to queues that are being used by any kind of worker. Available implementations at the moment:

Installation

got get github.com/ericbrisrubio/queuepublisher

Example

package main

import (
    publisher "github.com/ericbrisrubio/queuepublisher"
    _ "github.com/kavu/go-resque/go-redis" // Redis client from godis package
)


func main() {
    enqueuer := publisher.FactoryEnqueuer("resque", "<dbhost>", "<dbport>", "<dbname>", "<dbpass>", <use ssl connection>)
    enqueuer.PublishToQueue("<queueName>", "<className>", <data>)

}

Developer notes:

  • In case a new implementation needs to be added just implement IQueuePublisher interface
  • Add a new case to the switch in factoryEnqueuer.go file

MIT LICENSE