Documentation
¶
Overview ¶
Will be removed in v1.17
Will be removed in v1.17
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 Debug
- func (r *Debug) Fatal(args ...any)
- func (r *Debug) Fatalf(format string, args ...any)
- func (r *Debug) Fatalln(args ...any)
- func (r *Debug) Panic(args ...any)
- func (r *Debug) Panicf(format string, args ...any)
- func (r *Debug) Panicln(args ...any)
- func (r *Debug) Print(args ...any)
- func (r *Debug) Printf(format string, args ...any)
- func (r *Debug) Println(args ...any)
- type DriverCreator
- type Error
- func (r *Error) Fatal(args ...any)
- func (r *Error) Fatalf(format string, args ...any)
- func (r *Error) Fatalln(args ...any)
- func (r *Error) Panic(args ...any)
- func (r *Error) Panicf(format string, args ...any)
- func (r *Error) Panicln(args ...any)
- func (r *Error) Print(args ...any)
- func (r *Error) Printf(format string, args ...any)
- func (r *Error) Println(args ...any)
- type FailedJob
- type Failer
- type Fatal
- func (r *Fatal) Fatal(args ...any)
- func (r *Fatal) Fatalf(format string, args ...any)
- func (r *Fatal) Fatalln(args ...any)
- func (r *Fatal) Panic(args ...any)
- func (r *Fatal) Panicf(format string, args ...any)
- func (r *Fatal) Panicln(args ...any)
- func (r *Fatal) Print(args ...any)
- func (r *Fatal) Printf(format string, args ...any)
- func (r *Fatal) Println(args ...any)
- type Info
- func (r *Info) Fatal(args ...any)
- func (r *Info) Fatalf(format string, args ...any)
- func (r *Info) Fatalln(args ...any)
- func (r *Info) Panic(args ...any)
- func (r *Info) Panicf(format string, args ...any)
- func (r *Info) Panicln(args ...any)
- func (r *Info) Print(args ...any)
- func (r *Info) Printf(format string, args ...any)
- func (r *Info) Println(args ...any)
- type JobStorer
- type Machinery
- func (r *Machinery) Driver() string
- func (r *Machinery) Pop(queue string) (contractsqueue.ReservedJob, error)
- func (r *Machinery) Push(task contractsqueue.Task, queue string) error
- func (r *Machinery) Run(jobs []contractsqueue.Job, queue string, concurrent int) (*machinery.Worker, error)
- func (r *Machinery) Server(queue string) *machinery.Server
- type PendingJob
- type ServiceProvider
- type Sync
- type Warning
- func (r *Warning) Fatal(args ...any)
- func (r *Warning) Fatalf(format string, args ...any)
- func (r *Warning) Fatalln(args ...any)
- func (r *Warning) Panic(args ...any)
- func (r *Warning) Panicf(format string, args ...any)
- func (r *Warning) Panicln(args ...any)
- func (r *Warning) Print(args ...any)
- func (r *Warning) Printf(format string, args ...any)
- func (r *Warning) Println(args ...any)
- 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.16.0
func (r *Application) Connection(name string) (queue.Driver, error)
func (*Application) Failer ¶ added in v1.16.0
func (r *Application) Failer() queue.Failer
func (*Application) GetJob ¶ added in v1.16.0
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.16.0
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.16.0
func (*Config) DefaultConnection ¶ added in v1.12.0
func (*Config) DefaultQueue ¶ added in v1.16.0
func (*Config) FailedDatabase ¶ added in v1.16.0
func (*Config) FailedTable ¶ added in v1.16.0
type Database ¶ added in v1.16.0
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶ added in v1.16.0
func NewDatabase( config contractsqueue.Config, db contractsdb.DB, jobStorer contractsqueue.JobStorer, json contractsfoundation.Json, connection string) (*Database, error)
func (*Database) Pop ¶ added in v1.16.0
func (r *Database) Pop(queue string) (contractsqueue.ReservedJob, error)
type DatabaseReservedJob ¶ added in v1.16.0
type DatabaseReservedJob struct {
// contains filtered or unexported fields
}
func NewDatabaseReservedJob ¶ added in v1.16.0
func NewDatabaseReservedJob(job *models.Job, db contractsdb.DB, jobStorer contractsqueue.JobStorer, json contractsfoundation.Json, jobsTable string) (*DatabaseReservedJob, error)
func (*DatabaseReservedJob) Delete ¶ added in v1.16.0
func (r *DatabaseReservedJob) Delete() error
func (*DatabaseReservedJob) Task ¶ added in v1.16.0
func (r *DatabaseReservedJob) Task() contractsqueue.Task
type DriverCreator ¶ added in v1.16.0
type DriverCreator struct {
// contains filtered or unexported fields
}
func NewDriverCreator ¶ added in v1.16.0
func NewDriverCreator(config contractsqueue.Config, db contractsdb.DB, jobStorer contractsqueue.JobStorer, json contractsfoundation.Json, log contractslog.Log) *DriverCreator
func (*DriverCreator) Create ¶ added in v1.16.0
func (r *DriverCreator) Create(connection string) (contractsqueue.Driver, error)
type FailedJob ¶ added in v1.16.0
type FailedJob struct {
// contains filtered or unexported fields
}
func NewFailedJob ¶ added in v1.16.0
func NewFailedJob(failedJob models.FailedJob, query db.Query, queue contractsqueue.Queue, json foundation.Json) *FailedJob
func (*FailedJob) Connection ¶ added in v1.16.0
type Failer ¶ added in v1.16.0
type Failer struct {
// contains filtered or unexported fields
}
type JobStorer ¶ added in v1.16.0
type JobStorer struct {
// contains filtered or unexported fields
}
func NewJobStorer ¶ added in v1.16.0
func NewJobStorer() *JobStorer
func (*JobStorer) All ¶ added in v1.16.0
func (r *JobStorer) All() []contractsqueue.Job
All gets all registered jobs
func (*JobStorer) Get ¶ added in v1.16.0
func (r *JobStorer) Get(signature string) (contractsqueue.Job, error)
Get gets a registered job using its signature
func (*JobStorer) Register ¶ added in v1.16.0
func (r *JobStorer) Register(jobs []contractsqueue.Job)
Register registers jobs to the job manager
type Machinery ¶ added in v1.12.0
type Machinery struct {
// contains filtered or unexported fields
}
func NewMachinery ¶ added in v1.12.0
func (*Machinery) Pop ¶ added in v1.16.0
func (r *Machinery) Pop(queue string) (contractsqueue.ReservedJob, error)
Machinery server will pop tasks automatically
func (*Machinery) Push ¶ added in v1.16.0
func (r *Machinery) Push(task contractsqueue.Task, queue string) error
type PendingJob ¶ added in v1.16.0
type PendingJob struct {
// contains filtered or unexported fields
}
func NewPendingChainJob ¶ added in v1.16.0
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.16.0
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.16.0
func (r *PendingJob) Delay(delay time.Time) contractsqueue.PendingJob
Delay sets a delay time for the task
func (*PendingJob) Dispatch ¶ added in v1.16.0
func (r *PendingJob) Dispatch() error
Dispatch dispatches the task
func (*PendingJob) DispatchSync ¶ added in v1.16.0
func (r *PendingJob) DispatchSync() error
DispatchSync dispatches the task synchronously
func (*PendingJob) OnConnection ¶ added in v1.16.0
func (r *PendingJob) OnConnection(connection string) contractsqueue.PendingJob
OnConnection sets the connection name
func (*PendingJob) OnQueue ¶ added in v1.16.0
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.16.0
func (r *ServiceProvider) Relationship() binding.Relationship
Source Files
¶
Click to show internal directories.
Click to hide internal directories.