handler

package
v0.0.0-...-49c38f5 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PathProject is the top-leve directory in which directories of active projects are located.
	PathProject string = "/project"

	// StagerJobQueueName is the queue name for stager jobs.
	StagerJobQueueName string = "stager"

	// MaxRetries (i.e. total attempts - 1)
	MaxRetries int = 2

	// RetryIntervalSeconds
	RetryIntervalSeconds int = 1
)
View Source
var (
	// NotImplementedError indicates the implementation of the handler is not implemented yet.
	NotImplementedError int64 = 100

	// JobQueueError indicates failure adding/retrieving job from the stager job queue.
	JobQueueError int64 = 101

	// JobDataError indicates invalid job data format causing (de-)serialization failure.
	JobDataError int64 = 102

	// JobCreateError indicates failure creating/registering new job to the stager job queue.
	JobCreateError int64 = 103

	// FileSystemError indicates failure on filesystem operation
	FileSystemError int64 = 104
)

Error code definitions.

Functions

func DeleteJob

func DeleteJob(ctx context.Context, inspector *asynq.Inspector) func(params operations.DeleteJobIDParams, principal *models.Principal) middleware.Responder

DeleteJob cancels the job.

func GetJob

func GetJob(ctx context.Context, inspector *asynq.Inspector) func(params operations.GetJobIDParams, principal *models.Principal) middleware.Responder

GetJob retrieves job information.

func GetJobs

func GetJobs(ctx context.Context, inspector *asynq.Inspector) func(params operations.GetJobsParams, principal *models.Principal) middleware.Responder

GetJobs retrieves all jobs owned by the `principal`.

func GetPing

GetPing returns dummy string for health check, including the authentication.

func ListDir

func ListDir(ctx context.Context) func(params operations.GetDirParams, principal *models.Principal) middleware.Responder

func NewJob

func NewJob(ctx context.Context, client *asynq.Client, rdb *redis.Client) func(params operations.PostJobParams, principal *models.Principal) middleware.Responder

NewJob registers the incoming transfer request as a new stager job in the queue.

func NewJobs

func NewJobs(ctx context.Context, client *asynq.Client, rdb *redis.Client) func(params operations.PostJobsParams, principal *models.Principal) middleware.Responder

NewJobs registers the incoming transfer request as multiple stager jobs in the queue.

func RescheduleJob

func RescheduleJob(ctx context.Context, client *asynq.Client, inspector *asynq.Inspector) func(params operations.PutJobScheduledIDParams, principal *models.Principal) middleware.Responder

RescheduleJob

Types

This section is empty.

Jump to

Keyboard shortcuts

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