apollo-backend/internal/worker/worker.go
2022-05-21 13:17:04 -04:00

20 lines
436 B
Go

package worker
import (
"context"
"time"
"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"
)
const pollDuration = 100 * time.Millisecond
type NewWorkerFn func(context.Context, *logrus.Logger, *statsd.Client, *pgxpool.Pool, *redis.Client, rmq.Connection, int) Worker
type Worker interface {
Start() error
Stop()
}