github.com/goravel/framework@v1.13.9/contracts/queue/task.go (about) 1 package queue 2 3 import ( 4 "time" 5 ) 6 7 //go:generate mockery --name=Task 8 type Task interface { 9 // Dispatch dispatches the task. 10 Dispatch() error 11 // DispatchSync dispatches the task synchronously. 12 DispatchSync() error 13 // Delay dispatches the task after the given delay. 14 Delay(time time.Time) Task 15 // OnConnection sets the connection of the task. 16 OnConnection(connection string) Task 17 // OnQueue sets the queue of the task. 18 OnQueue(queue string) Task 19 }