Documentation
¶
Index ¶
- func NewProvider(db *sql.DB, opts ...ProviderOption) scrapemate.JobProvider
- func NewResultWriter(db *sql.DB) scrapemate.ResultWriter
- func NewResultWriterWithSync(cfg ResultWriterConfig) scrapemate.ResultWriter
- func UpdateParentJobProgress(ctx context.Context, db *sql.DB, parentJobID string) error
- type GmapsJobPusher
- type ProviderOption
- type ResultWriterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(db *sql.DB, opts ...ProviderOption) scrapemate.JobProvider
func NewResultWriter ¶
func NewResultWriter(db *sql.DB) scrapemate.ResultWriter
func NewResultWriterWithSync ¶
func NewResultWriterWithSync(cfg ResultWriterConfig) scrapemate.ResultWriter
NewResultWriterWithSync creates a result writer that syncs progress back to parent jobs
Types ¶
type GmapsJobPusher ¶
type GmapsJobPusher interface {
Push(ctx context.Context, job scrapemate.IJob) error
PushWithParent(ctx context.Context, job scrapemate.IJob, parentID string) error
}
GmapsJobPusher interface for pushing jobs to gmaps_jobs table. Used by JobService to bridge Dashboard jobs to DSN workers.
func NewGmapsJobPusher ¶
func NewGmapsJobPusher(db *sql.DB) GmapsJobPusher
NewGmapsJobPusher creates a GmapsJobPusher for pushing jobs to gmaps_jobs. Used by JobService to bridge Dashboard jobs to DSN workers.
type ProviderOption ¶
type ProviderOption func(*provider)
ProviderOption allows configuring the provider
func WithBatchSize ¶
func WithBatchSize(size int) ProviderOption
WithBatchSize sets custom batch size
type ResultWriterConfig ¶
type ResultWriterConfig struct {
DB *sql.DB
SyncParentProgress bool // Enable syncing progress back to jobs_queue
}
ResultWriterConfig configures the result writer