Documentation ¶
Index ¶
- Constants
- func BulkCreateJobsHandler(c *gin.Context)
- func CORSMiddleware() gin.HandlerFunc
- func CleanJobsHandler(c *gin.Context)
- func CompleteJobHandler(c *gin.Context)
- func CreateJobHandler(c *gin.Context)
- func FormatTimestamp(ts time.Time) time.Time
- func GetJobsHandler(c *gin.Context)
- func HealthHandler(c *gin.Context)
- func HeartBeatJobHandler(c *gin.Context)
- func InitServer()
- func InitServerEngine() (r *gin.Engine)
- func LivenessHandler(c *gin.Context)
- func ReadStatsJobHandler(c *gin.Context)
- func ReleaseJobHandler(c *gin.Context)
- func StartJobHandler(c *gin.Context)
- type RequestOptions
Constants ¶
View Source
const ( JobServiceKey = "job_service" UuidPathKey = "uuid" )
View Source
const ( ContentTypeJSON = "application/json" ContentTypeGraphQL = "application/graphql" ContentTypeFormURLEncoded = "application/x-www-form-urlencoded" )
Variables ¶
This section is empty.
Functions ¶
func BulkCreateJobsHandler ¶
BulkCreateJobsHandler create multiple new jobs
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
func CleanJobsHandler ¶
CleanJobsHandler is the handler to clean the stalled jobs
func CompleteJobHandler ¶
CompleteJobHandler marks a job completed
func GetJobsHandler ¶
GetJobsHandler gets the latest job from the database Checks if there is already a job assigned
func HealthHandler ¶
func HeartBeatJobHandler ¶
HeartBeatJobHandler mark job as alive
func InitServer ¶
func InitServer()
func InitServerEngine ¶
func LivenessHandler ¶
func ReadStatsJobHandler ¶
ReadStatsJobHandler reads the current stats
func ReleaseJobHandler ¶
ReleaseJobHandler Releases the job after crash or problem
Types ¶
type RequestOptions ¶
type RequestOptions struct { Query string `json:"query" url:"query" schema:"query"` Variables map[string]interface{} `json:"variables" url:"variables" schema:"variables"` OperationName string `json:"operationName" url:"operationName" schema:"operationName"` }
func NewRequestOptions ¶
func NewRequestOptions(r *http.Request) *RequestOptions
Click to show internal directories.
Click to hide internal directories.