Package to publish jobs to queues that are being used by any kind of worker. Available implementations at the moment:
- resque (Publish jobs to an existing resque system https://github.com/resque/resque)
got get github.com/ericbrisrubio/queuepublisher
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>)
}
- In case a new implementation needs to be added just implement IQueuePublisher interface
- Add a new case to the switch in factoryEnqueuer.go file