apollo-backend/internal/worker/worker.go
Andre Medeiros a5f5086938 tracing
2022-11-03 13:43:10 -04:00

21 lines
470 B
Go

package worker
import (
"context"
"time"
"github.com/DataDog/datadog-go/statsd"
"github.com/adjust/rmq/v5"
"github.com/go-redis/redis/v8"
"github.com/jackc/pgx/v4/pgxpool"
"go.opentelemetry.io/otel/trace"
"go.uber.org/zap"
)
const pollDuration = 100 * time.Millisecond
type NewWorkerFn func(context.Context, *zap.Logger, trace.Tracer, *statsd.Client, *pgxpool.Pool, *redis.Client, rmq.Connection, int) Worker
type Worker interface {
Start() error
Stop()
}