mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-23 20:27:42 +00:00
17 lines
382 B
Go
17 lines
382 B
Go
|
package worker
|
||
|
|
||
|
import (
|
||
|
"github.com/DataDog/datadog-go/statsd"
|
||
|
"github.com/adjust/rmq/v4"
|
||
|
"github.com/go-redis/redis/v8"
|
||
|
"github.com/jackc/pgx/v4/pgxpool"
|
||
|
"github.com/sirupsen/logrus"
|
||
|
)
|
||
|
|
||
|
type NewWorkerFn func(logger *logrus.Logger, statsd *statsd.Client, db *pgxpool.Pool, redis *redis.Client, queue rmq.Connection) Worker
|
||
|
|
||
|
type Worker interface {
|
||
|
Start(int) error
|
||
|
Stop()
|
||
|
}
|