Documentation
¶
Index ¶
- Variables
- type Application
- func (r *Application) Chain(jobs []queue.ChainJob) queue.PendingJob
- func (r *Application) Connection(name string) (queue.Driver, error)
- func (r *Application) Failer() queue.Failer
- func (r *Application) GetJob(signature string) (queue.Job, error)
- func (r *Application) GetJobs() []queue.Job
- func (r *Application) Job(job queue.Job, args ...[]queue.Arg) queue.PendingJob
- func (r *Application) JobStorer() queue.JobStorer
- func (r *Application) Register(jobs []queue.Job)
- func (r *Application) Worker(payloads ...queue.Args) queue.Worker
- type Config
- func (r *Config) Debug() bool
- func (r *Config) DefaultConcurrent() int
- func (r *Config) DefaultConnection() string
- func (r *Config) DefaultQueue() string
- func (r *Config) Driver(connection string) string
- func (r *Config) FailedDatabase() string
- func (r *Config) FailedTable() string
- func (r *Config) Via(connection string) any
- type Database
- type DatabaseReservedJob
- type DriverCreator
- type FailedJob
- type Failer
- type JobStorer
- type PendingJob
- type ServiceProvider
- type Sync
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SyncDriverName = "sync"
)
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶ added in v1.7.2
func (*Application) Chain ¶
func (r *Application) Chain(jobs []queue.ChainJob) queue.PendingJob
func (*Application) Connection ¶ added in v1.15.12
func (r *Application) Connection(name string) (queue.Driver, error)
func (*Application) Failer ¶ added in v1.15.12
func (r *Application) Failer() queue.Failer
func (*Application) GetJob ¶ added in v1.15.12
func (r *Application) GetJob(signature string) (queue.Job, error)
func (*Application) GetJobs ¶
func (r *Application) GetJobs() []queue.Job
func (*Application) Job ¶
func (r *Application) Job(job queue.Job, args ...[]queue.Arg) queue.PendingJob
func (*Application) JobStorer ¶ added in v1.15.12
func (r *Application) JobStorer() queue.JobStorer
func (*Application) Register ¶
func (r *Application) Register(jobs []queue.Job)
type Config ¶ added in v1.12.0
type Config struct {
contractsconfig.Config
// contains filtered or unexported fields
}
func NewConfig ¶ added in v1.12.0
func NewConfig(config contractsconfig.Config) *Config
func (*Config) DefaultConcurrent ¶ added in v1.15.12
func (*Config) DefaultConnection ¶ added in v1.12.0
func (*Config) DefaultQueue ¶ added in v1.15.12
func (*Config) FailedDatabase ¶ added in v1.15.12
func (*Config) FailedTable ¶ added in v1.15.12
type Database ¶ added in v1.15.12
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶ added in v1.15.12
func NewDatabase( config contractsqueue.Config, db contractsdb.DB, jobStorer contractsqueue.JobStorer, json contractsfoundation.Json, connection string) (*Database, error)
func (*Database) Pop ¶ added in v1.15.12
func (r *Database) Pop(queue string) (contractsqueue.ReservedJob, error)
type DatabaseReservedJob ¶ added in v1.15.12
type DatabaseReservedJob struct {
// contains filtered or unexported fields
}
func NewDatabaseReservedJob ¶ added in v1.15.12
func NewDatabaseReservedJob(job *models.Job, db contractsdb.DB, jobStorer contractsqueue.JobStorer, json contractsfoundation.Json, jobsTable string) (*DatabaseReservedJob, error)
func (*DatabaseReservedJob) Delete ¶ added in v1.15.12
func (r *DatabaseReservedJob) Delete() error
func (*DatabaseReservedJob) Task ¶ added in v1.15.12
func (r *DatabaseReservedJob) Task() contractsqueue.Task
type DriverCreator ¶ added in v1.15.12
type DriverCreator struct {
// contains filtered or unexported fields
}
func NewDriverCreator ¶ added in v1.15.12
func NewDriverCreator(config contractsqueue.Config, db contractsdb.DB, jobStorer contractsqueue.JobStorer, json contractsfoundation.Json, log contractslog.Log) *DriverCreator
func (*DriverCreator) Create ¶ added in v1.15.12
func (r *DriverCreator) Create(connection string) (contractsqueue.Driver, error)
type FailedJob ¶ added in v1.15.12
type FailedJob struct {
// contains filtered or unexported fields
}
func NewFailedJob ¶ added in v1.15.12
func NewFailedJob(failedJob models.FailedJob, query db.Query, queue contractsqueue.Queue, json foundation.Json) *FailedJob
func (*FailedJob) Connection ¶ added in v1.15.12
type Failer ¶ added in v1.15.12
type Failer struct {
// contains filtered or unexported fields
}
type JobStorer ¶ added in v1.15.12
type JobStorer struct {
// contains filtered or unexported fields
}
func NewJobStorer ¶ added in v1.15.12
func NewJobStorer() *JobStorer
func (*JobStorer) All ¶ added in v1.15.12
func (r *JobStorer) All() []contractsqueue.Job
All gets all registered jobs
func (*JobStorer) Get ¶ added in v1.15.12
func (r *JobStorer) Get(signature string) (contractsqueue.Job, error)
Get gets a registered job using its signature
func (*JobStorer) Register ¶ added in v1.15.12
func (r *JobStorer) Register(jobs []contractsqueue.Job)
Register registers jobs to the job manager
type PendingJob ¶ added in v1.15.12
type PendingJob struct {
// contains filtered or unexported fields
}
func NewPendingChainJob ¶ added in v1.15.12
func NewPendingChainJob( config contractsqueue.Config, db contractsdb.DB, jobStorer contractsqueue.JobStorer, json contractsfoundation.Json, jobs []contractsqueue.ChainJob, log contractslog.Log, ) *PendingJob
func NewPendingJob ¶ added in v1.15.12
func NewPendingJob( config contractsqueue.Config, db contractsdb.DB, jobStorer contractsqueue.JobStorer, json contractsfoundation.Json, job contractsqueue.Job, log contractslog.Log, args ...[]contractsqueue.Arg) *PendingJob
func (*PendingJob) Delay ¶ added in v1.15.12
func (r *PendingJob) Delay(delay time.Time) contractsqueue.PendingJob
Delay sets a delay time for the task
func (*PendingJob) Dispatch ¶ added in v1.15.12
func (r *PendingJob) Dispatch() error
Dispatch dispatches the task
func (*PendingJob) DispatchSync ¶ added in v1.15.12
func (r *PendingJob) DispatchSync() error
DispatchSync dispatches the task synchronously
func (*PendingJob) OnConnection ¶ added in v1.15.12
func (r *PendingJob) OnConnection(connection string) contractsqueue.PendingJob
OnConnection sets the connection name
func (*PendingJob) OnQueue ¶ added in v1.15.12
func (r *PendingJob) OnQueue(queue string) contractsqueue.PendingJob
OnQueue sets the queue name
type ServiceProvider ¶
type ServiceProvider struct {
}
func (*ServiceProvider) Boot ¶
func (r *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (r *ServiceProvider) Register(app foundation.Application)
func (*ServiceProvider) Relationship ¶ added in v1.15.12
func (r *ServiceProvider) Relationship() binding.Relationship
Source Files
¶
Click to show internal directories.
Click to hide internal directories.