Documentation ¶
Overview ¶
Package handlers implements the http handlers for the api and defines the Server structure for shared context between handlers.
Index ¶
- type JobStatusNotification
- type JobStatusNotificationContainer
- type JobStatusNotificationDetail
- type KillTaskID
- type KillTasks
- type Server
- func (s *Server) ActivateJobQueue(c echo.Context) error
- func (s *Server) DeactivateJobQueue(c echo.Context) error
- func (s *Server) FetchLogs(c echo.Context) error
- func (s *Server) Find(c echo.Context) error
- func (s *Server) FindOne(c echo.Context) error
- func (s *Server) GetStatus(c echo.Context) error
- func (s *Server) IndexHandler(c echo.Context) error
- func (s *Server) JobStats(c echo.Context) error
- func (s *Server) JobStatusNotification(c echo.Context) error
- func (s *Server) KillMany(c echo.Context) error
- func (s *Server) KillOne(c echo.Context) error
- func (s *Server) ListActiveJobQueues(c echo.Context) error
- func (s *Server) ListAllJobQueues(c echo.Context) error
- func (s *Server) SubscribeToJobEvent(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobStatusNotification ¶
type JobStatusNotification struct { Time string `json:"time"` Detail JobStatusNotificationDetail `json:"detail"` }
This structure and the ones below it match the CloudWatch event JSON we get from AWS Lambda function. It doesn't match all the fields but matches most of the useful ones we track.
type JobStatusNotificationDetail ¶
type JobStatusNotificationDetail struct { JobName string `json:"jobName"` JobId string `json:"jobId"` JobQueue string `json:"jobQueue"` Status string `json:"status"` CreatedAt int64 `json:"createdAt"` StartedAt *int64 `json:"startedAt"` Container JobStatusNotificationContainer `json:"container"` JobDefinition string `json:"jobDefinition"` }
type KillTaskID ¶
type KillTaskID struct {
ID string `json:"id" form:"id" query:"id"`
}
KillTaskID is a struct to handle JSON request to kill a task
type KillTasks ¶
type KillTasks struct {
IDs []string `json:"ids" form:"ids" query:"ids"`
}
KillTasks is a struct to handle JSON request to kill many tasks
type Server ¶
type Server struct { Storage jobs.FinderStorer Killer jobs.Killer Index []byte }
func (*Server) Find ¶
Find is a request handler, returns json with jobs matching the query param 'q'
func (*Server) FindOne ¶
FindOne is a request handler, returns a job matching the query parameter 'q'
func (*Server) IndexHandler ¶
IndexHandler returns
func (*Server) KillMany ¶
KillMany is a request handler, kills a job matching the post parameter 'id' (AWS task ID)