Versions in this module Expand all Collapse all v1 v1.1.0 Dec 1, 2019 v1.0.0 Nov 7, 2019 Changes in this version + const BucketNameForJobs + var DefaultJobName = "default" + var WorkerDefaultUserAgent = fmt.Sprintf("%s/%s", hq.DisplayName, hq.Version) + func AppContextMiddleware(app *App) echo.MiddlewareFunc + func CreateJobHandler(c echo.Context) error + func DeleteJobHandler(c echo.Context) error + func ErrorHandler(err error, c echo.Context) + func GetJobHandler(c echo.Context) error + func InfoHandler(c echo.Context) error + func ListJobsHandler(c echo.Context) error + func NewErrorValidationFailed(msgs ...string) *echo.HTTPError + func NewHttpErrorBadRequest(msgs ...string) *echo.HTTPError + func NewHttpErrorNotFound(msgs ...string) *echo.HTTPError + func RestartJobHandler(c echo.Context) error + func StatsHandler(c echo.Context) error + func StopJobHandler(c echo.Context) error + func UIFallbackHandler(c echo.Context) error + func UIIndexHandler(c echo.Context) error + type App struct + AccessLogFile *os.File + AccessLogFileWriter reopen.Writer + Background *Background + Config *Config + DB *bolt.DB + DataDir string + Echo *echo.Echo + Gen katsubushi.Generator + LogLevel log.Lvl + LogfileWriter reopen.Writer + Logger echo.Logger + QueueManager *QueueManager + Store *Store + UseTempDataDir bool + func NewApp(config ...*Config) *App + func (app *App) BoltDBPath() string + func (app *App) Close() error + func (app *App) ListenAndServe() error + func (app *App) Open() error + type AppContext struct + func (c *AppContext) App() *App + type Background struct + func NewBackground(app *App) *Background + func (bg *Background) Close() + func (bg *Background) Start() + type Config struct + AccessLogfile string + Addr string + DataDir string + Dispatchers int64 + IDEpoch []int + JobLifetime int64 + JobListDefaultLimit int + LogLevel string + Logfile string + MaxWorkers int64 + Queues int64 + ServerId uint + ShutdownTimeout int64 + UI bool + UIBasename string + func NewConfig() *Config + func (c *Config) IDEpochTime() (time.Time, error) + func (c *Config) LoadConfigFile(path string) error + func (c *Config) SetLogLevel(level string) + type Dispatcher struct + NumWorkers int64 + type ErrJobAlreadyExisted struct + ID uint64 + Name string + func (e *ErrJobAlreadyExisted) Error() string + type ErrJobNotFound struct + ID uint64 + func (e *ErrJobNotFound) Error() string + type J struct + Canceled bool + Comment string + CreatedAt time.Time + Err string + Failure bool + FinishedAt *time.Time + Headers map[string]string + ID uint64 + Name string + Output string + Payload json.RawMessage + StartedAt *time.Time + StatusCode *int + Success bool + Timeout int64 + URL string + type ListJobsQuery struct + Begin *uint64 + Limit int + Name string + Reverse bool + Status string + Term string + type QueueManager struct + App *App + Dispatchers []*Dispatcher + Queue chan *hq.Job + RunningJobs map[uint64]*RunningJob + WaitingJobs map[uint64]*WaitingJob + WorkerWg *sync.WaitGroup + func NewQueueManager(app *App) *QueueManager + func (m *QueueManager) CancelJob(id uint64) error + func (m *QueueManager) EnqueueAsync(job *hq.Job) + func (m *QueueManager) RegisterRunningJob(job *hq.Job, cancel context.CancelFunc) + func (m *QueueManager) RegisterWaitingJob(job *hq.Job) + func (m *QueueManager) RemoveRunningJob(job *hq.Job) + func (m *QueueManager) Start() + func (m *QueueManager) UpdateJobStatus(job *hq.Job) *hq.Job + func (m *QueueManager) Wait() + type RunningJob struct + Cancel context.CancelFunc + Job *hq.Job + type Store struct + func (s *Store) CreateJob(job *hq.Job) error + func (s *Store) DeleteJob(id uint64) error + func (s *Store) FetchJob(id uint64, job *hq.Job) error + func (s *Store) Init() error + func (s *Store) JobsStats() (*bolt.BucketStats, error) + func (s *Store) ListJobs(query *ListJobsQuery, ret *hq.JobList) error + func (s *Store) UpdateJob(job *hq.Job) error + type Template struct + func NewTemplate(app *App) *Template + func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error + type WaitingJob struct + Job *hq.Job