Documentation ¶
Index ¶
- func FormatTime(unixTime int64) string
- func NewRouter(scheduler eremetic.Scheduler, conf *config.Config, db eremetic.TaskDB) *mux.Router
- type Handler
- func (h Handler) AddTask(conf *config.Config) http.HandlerFunc
- func (h Handler) DeleteTask(conf *config.Config) http.HandlerFunc
- func (h Handler) GetFromSandbox(file string) http.HandlerFunc
- func (h Handler) GetTaskInfo(conf *config.Config) http.HandlerFunc
- func (h Handler) IndexHandler(conf *config.Config) http.HandlerFunc
- func (h Handler) KillTask(conf *config.Config) http.HandlerFunc
- func (h Handler) ListRunningTasks() http.HandlerFunc
- func (h Handler) NotFound(conf *config.Config) http.HandlerFunc
- func (h Handler) StaticAssets() http.Handler
- func (h Handler) Version(conf *config.Config) http.HandlerFunc
- type Route
- type Routes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
FormatTime takes a UnixDate and transforms it into YYYY-mm-dd HH:MM:SS
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler holds the server context.
func NewHandler ¶
NewHandler returns a new instance of Handler.
func (Handler) AddTask ¶
func (h Handler) AddTask(conf *config.Config) http.HandlerFunc
AddTask handles adding a task to the queue
func (Handler) DeleteTask ¶ added in v0.27.0
func (h Handler) DeleteTask(conf *config.Config) http.HandlerFunc
func (Handler) GetFromSandbox ¶
func (h Handler) GetFromSandbox(file string) http.HandlerFunc
GetFromSandbox fetches a file from the sandbox of the agent that ran the task
func (Handler) GetTaskInfo ¶
func (h Handler) GetTaskInfo(conf *config.Config) http.HandlerFunc
GetTaskInfo returns information about the given task.
func (Handler) IndexHandler ¶
func (h Handler) IndexHandler(conf *config.Config) http.HandlerFunc
IndexHandler returns the index template, or no content.
func (Handler) KillTask ¶ added in v0.27.0
func (h Handler) KillTask(conf *config.Config) http.HandlerFunc
func (Handler) ListRunningTasks ¶
func (h Handler) ListRunningTasks() http.HandlerFunc
ListRunningTasks returns information about running tasks in the database.
func (Handler) NotFound ¶
func (h Handler) NotFound(conf *config.Config) http.HandlerFunc
NotFound is in charge of reporting that a task can not be found.
func (Handler) StaticAssets ¶
StaticAssets handles the serving of compiled static assets.
Click to show internal directories.
Click to hide internal directories.