Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(repo Repository) core.JobService
Types ¶
type Handler ¶
type Handler interface { List(c echo.Context) error Create(c echo.Context) error Cancel(c echo.Context) error }
func NewHandler ¶
func NewHandler(service core.JobService) Handler
type Reactor ¶
func NewReactor ¶
func NewReactor( store core.StoreService, job core.JobService, ) Reactor
Newreactor creates a new reactor
type Repository ¶
type Repository interface { List(ctx context.Context, authorID string) ([]core.Job, error) Enqueue(ctx context.Context, author, typ, payload string, scheduled time.Time) (core.Job, error) Dequeue(ctx context.Context) (*core.Job, error) Complete(ctx context.Context, id, status, result string) (core.Job, error) Cancel(ctx context.Context, id string) (core.Job, error) Clean(ctx context.Context, olderThan time.Time) ([]core.Job, error) }
func NewRepository ¶
func NewRepository(db *gorm.DB) Repository
Click to show internal directories.
Click to hide internal directories.