Versions in this module Expand all Collapse all v1 v1.10.2 Mar 8, 2026 Changes in this version + const QueueMaintenance + var ValidJobStates = map[string]rivertype.JobState + func CreateRiverUIHandler(_ context.Context, client *Client) (*riverui.Handler, error) + type CleanupArgs struct + func (CleanupArgs) InsertOpts() river.InsertOpts + func (CleanupArgs) Kind() string + type CleanupWorker struct + func (w *CleanupWorker) Work(ctx context.Context, _ *river.Job[CleanupArgs]) error + type Client struct + func NewClient(dbPool *pgxpool.Pool, encryptionKey []byte) (*Client, error) + func NewWorkerClient(dbPool *pgxpool.Pool, manager ScrapeManager) (*Client, error) + func (c *Client) DeleteJob(ctx context.Context, encodedJobID string) error + func (c *Client) GetDashboardStats(ctx context.Context) (*DashboardStats, error) + func (c *Client) GetJobResults(ctx context.Context, encodedJobID string) (json.RawMessage, string, error) + func (c *Client) GetJobStatus(ctx context.Context, jobID string) (*JobStatus, error) + func (c *Client) InsertJob(ctx context.Context, args ScrapeJobArgs) (string, error) + func (c *Client) InsertWorkerDeleteJob(ctx context.Context, args WorkerDeleteArgs) error + func (c *Client) InsertWorkerProvisionJob(ctx context.Context, args WorkerProvisionArgs) error + func (c *Client) ListJobs(ctx context.Context, state string, limit int, cursor string) (*JobListResult, error) + func (c *Client) RiverClient() *river.Client[pgx.Tx] + func (c *Client) Start(ctx context.Context) error + func (c *Client) StartRetryPromoter(ctx context.Context) + func (c *Client) Stop(ctx context.Context) error + type DashboardStats struct + JobsToday int + TotalResults int + type JobDeleteArgs struct + JobID int64 + func (JobDeleteArgs) InsertOpts() river.InsertOpts + func (JobDeleteArgs) Kind() string + type JobDeleteWorker struct + func (w *JobDeleteWorker) Work(ctx context.Context, job *river.Job[JobDeleteArgs]) error + type JobListItem struct + CompletedAt *time.Time + CreatedAt time.Time + Error string + JobID string + Keyword string + ResultCount int + StartedAt *time.Time + Status string + type JobListResult struct + HasMore bool + Jobs []JobListItem + NextCursor string + type JobStatus struct + CompletedAt *time.Time + CreatedAt time.Time + Error string + JobID string + Keyword string + ResultCount int + Results json.RawMessage + StartedAt *time.Time + Status string + type ScrapeJobArgs struct + Email bool + ExtraReviews bool + FastMode bool + GeoCoordinates string + Keyword string + Lang string + MaxDepth int + Radius float64 + TimeoutSecs int + Zoom int + func (ScrapeJobArgs) InsertOpts() river.InsertOpts + func (ScrapeJobArgs) Kind() string + type ScrapeManager interface + ForceFlush func(jobID string) + JobDone func() + MarkDone func(jobID string) + RegisterJob func(jobID string, riverJobID int64, keyword string) <-chan scraper.FlushResult + SubmitJob func(ctx context.Context, job scrapemate.IJob) error + type ScrapeWatchdogMetrics struct + FlushWaitWarnTotal int64 + LongRuntimeWarnTotal int64 + func GetScrapeWatchdogMetrics() ScrapeWatchdogMetrics + type ScrapeWorker struct + Manager ScrapeManager + func (w *ScrapeWorker) NextRetryAt(_ *river.Job[ScrapeJobArgs]) time.Time + func (w *ScrapeWorker) Timeout(job *river.Job[ScrapeJobArgs]) time.Duration + func (w *ScrapeWorker) Work(ctx context.Context, job *river.Job[ScrapeJobArgs]) error + type WorkerDeleteArgs struct + Provider string + ProviderResourceID string + ResourceID int + func (WorkerDeleteArgs) InsertOpts() river.InsertOpts + func (WorkerDeleteArgs) Kind() string + type WorkerDeleteWorker struct + func (w *WorkerDeleteWorker) Work(ctx context.Context, job *river.Job[WorkerDeleteArgs]) error + type WorkerHealthCheckArgs struct + func (WorkerHealthCheckArgs) InsertOpts() river.InsertOpts + func (WorkerHealthCheckArgs) Kind() string + type WorkerHealthCheckWorker struct + func (w *WorkerHealthCheckWorker) Work(ctx context.Context, _ *river.Job[WorkerHealthCheckArgs]) error + type WorkerProvisionArgs struct + Concurrency int + FastMode bool + MaxJobsPerCycle int + Name string + Provider string + Proxies string + Region string + ResourceID int + Size string + func (WorkerProvisionArgs) InsertOpts() river.InsertOpts + func (WorkerProvisionArgs) Kind() string + type WorkerProvisionWorker struct + func (w *WorkerProvisionWorker) Timeout(_ *river.Job[WorkerProvisionArgs]) time.Duration + func (w *WorkerProvisionWorker) Work(ctx context.Context, job *river.Job[WorkerProvisionArgs]) error