Documentation ¶
Index ¶
- type AbortingForwarder
- type BaseForwarder
- func (bf *BaseForwarder) GetJobs(ctx context.Context) ([]*jobsdb.JobT, bool, error)
- func (bf *BaseForwarder) GetSleepTime(limitReached bool) time.Duration
- func (bf *BaseForwarder) LoadMetaData(terminalErrFn func(error), schemaDB jobsdb.JobsDB, log logger.Logger, ...)
- func (bf *BaseForwarder) MarkJobStatuses(ctx context.Context, statusList []*jobsdb.JobStatusT) error
- type JobsForwarder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbortingForwarder ¶
type AbortingForwarder struct {
BaseForwarder
}
AbortingForwarder is a forwarder which aborts all jobs instead of forwarding them
func NewAbortingForwarder ¶
func NewAbortingForwarder(terminalErrFn func(error), schemaDB jobsdb.JobsDB, config *config.Config, log logger.Logger, stat stats.Stats) *AbortingForwarder
NewAbortingForwarder returns a new, properly initialized, AbortingForwarder
func (*AbortingForwarder) Start ¶
func (nf *AbortingForwarder) Start() error
Start starts the forwarder which reads jobs from the database and aborts them
type BaseForwarder ¶
type BaseForwarder struct {
// contains filtered or unexported fields
}
func (*BaseForwarder) GetJobs ¶
GetJobs is an abstraction over the GetUnprocessed method of the jobsdb which includes retries
func (*BaseForwarder) GetSleepTime ¶
func (bf *BaseForwarder) GetSleepTime(limitReached bool) time.Duration
GetSleepTime returns the sleep time based on the limitReached flag
func (*BaseForwarder) LoadMetaData ¶
func (bf *BaseForwarder) LoadMetaData(terminalErrFn func(error), schemaDB jobsdb.JobsDB, log logger.Logger, config *config.Config, stat stats.Stats)
LoadMetaData loads the metadata required by the forwarders
func (*BaseForwarder) MarkJobStatuses ¶
func (bf *BaseForwarder) MarkJobStatuses(ctx context.Context, statusList []*jobsdb.JobStatusT) error
MarkJobStatuses is an abstraction over the UpdateJobStatusInTx method of the jobsdb which includes retries
type JobsForwarder ¶
type JobsForwarder struct { BaseForwarder // contains filtered or unexported fields }
JobsForwarder is a forwarder that transforms and forwards jobs to a pulsar topic
func NewJobsForwarder ¶
func NewJobsForwarder(terminalErrFn func(error), schemaDB jobsdb.JobsDB, client *pulsar.Client, config *config.Config, backendConfig backendconfig.BackendConfig, log logger.Logger, stat stats.Stats) *JobsForwarder
NewJobsForwarder returns a new, properly initialized, JobsForwarder
func (*JobsForwarder) Start ¶
func (jf *JobsForwarder) Start() error
Start starts the forwarder which will start forwarding jobs from database to the appropriate pulsar topics