services

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATE_FORMAT = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandsService

type CommandsService struct {
	Events *events.Event
}

func NewCommandService

func NewCommandService(e *events.Event) *CommandsService

func (*CommandsService) ExecuteCommand

func (cs *CommandsService) ExecuteCommand(cmdString string)

type JobService

type JobService struct {
	Queries   *jobs.Queries
	Scheduler *scheduler.Scheduler
	Events    *events.Event
}

func NewJobService

func NewJobService() (*JobService, error)

func (*JobService) ExecuteJob

func (js *JobService) ExecuteJob(job *config.Job)

func (*JobService) ExecuteJobs

func (js *JobService) ExecuteJobs(jobs []config.Job)

func (*JobService) GetHandler

func (js *JobService) GetHandler() echo.HandlerFunc

func (*JobService) GetParser

func (js *JobService) GetParser() *cron.Parser

func (*JobService) GetQueries

func (js *JobService) GetQueries() *jobs.Queries

func (*JobService) IsIdle

func (js *JobService) IsIdle() bool

func (*JobService) ListJobs

func (js *JobService) ListJobs() []JobView

func (*JobService) ListRuns

func (js *JobService) ListRuns(name string, limit int64) ([]RunView, error)

func (*JobService) SetEvents

func (js *JobService) SetEvents(e *events.Event)

type JobView

type JobView struct {
	config.Job
	Runs []RunView `json:"runs"`
}

type RunView

type RunView struct {
	ID            int64                      `json:"id"`
	JobName       string                     `json:"job_name"`
	StatusID      int64                      `json:"status_id"`
	StartTimeUnix int64                      `json:"start_time_unix"`
	StartTime     string                     `json:"start_time"`
	EndTime       string                     `json:"end_time"`
	Duration      string                     `json:"duration"`
	Logs          []jobs.ListLogsByRunIDsRow `json:"logs"`
}

type Severity

type Severity int
const (
	Debug Severity = iota + 1
	Info
	Warning
	Error
)

type Status

type Status int64
const (
	Running Status = iota + 1
	Stopped
	Finished
)

func (Status) Int64

func (s Status) Int64() int64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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