worker

package
v0.0.0-...-54c2f7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: CC0-1.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoBasePathSet      = JobError{"empty BBBasePath: Must be set"}
	ErrParentJobNotFound  = JobError{"parent job not found"}
	ErrParentJobCancelled = JobError{"parent job cancelled"}
)

Functions

This section is empty.

Types

type AlrWorker

type AlrWorker struct {
	*postgres.AlrRepository
	repository.Repository
	StagingDir string `conf:"FHIR_STAGING_DIR"`
}

func NewAlrWorker

func NewAlrWorker(db *sql.DB) AlrWorker

func (*AlrWorker) ProcessAlrJob

func (a *AlrWorker) ProcessAlrJob(
	ctx context.Context,
	jobArgs models.JobAlrEnqueueArgs,
) error

ProcessAlrJob is a function called by the Worker to serve ALR data to users

type JobError

type JobError struct {
	ErrorString string
}

func (JobError) Error

func (je JobError) Error() string

type MockWorker

type MockWorker struct {
	mock.Mock
}

MockWorker is an autogenerated mock type for the Worker type

func (*MockWorker) ProcessJob

func (_m *MockWorker) ProcessJob(ctx context.Context, job models.Job, jobArgs models.JobEnqueueArgs) error

ProcessJob provides a mock function with given fields: ctx, job, jobArgs

func (*MockWorker) ValidateJob

func (_m *MockWorker) ValidateJob(ctx context.Context, jobArgs models.JobEnqueueArgs) (*models.Job, error)

ValidateJob provides a mock function with given fields: ctx, jobArgs

type Worker

type Worker interface {
	ValidateJob(ctx context.Context, jobArgs models.JobEnqueueArgs) (*models.Job, error)
	ProcessJob(ctx context.Context, job models.Job, jobArgs models.JobEnqueueArgs) error
}

func NewWorker

func NewWorker(db *sql.DB) Worker

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL