blaze

package
v0.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package blaze integrates the mgojq package to handle asynchronous jobs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func C

func C(store *coal.SubStore) *mgojq.Collection

C will return the correct mgojq.Collection.

func JobController

func JobController(store *coal.Store, authorizers ...fire.Callback) *fire.Controller

JobController will return a basic controller that provides access to the jobs. At least one authorizer should be provided that restricts access to administrators.

Types

type Job

type Job struct {
	coal.Base `json:"-" bson:",inline" coal:"jobs"`
	Name      string    `json:"name"`
	Params    bson.M    `json:"params"`
	Status    string    `json:"status"`
	Created   time.Time `json:"created"`
	Attempts  int       `json:"attempts"`
	Delayed   time.Time `json:"delayed,omitempty" bson:",omitempty"`
	Started   time.Time `json:"started,omitempty" bson:",omitempty"`
	Ended     time.Time `json:"ended,omitempty" bson:",omitempty"`
	Result    bson.M    `json:"result,omitempty" bson:",omitempty"`
	Error     string    `json:"error,omitempty" bson:",omitempty"`
	Reason    string    `json:"reason,omitempty" bson:",omitempty"`
}

Job is the coal model for the mgojq.Job type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL