Documentation
¶
Index ¶
- type Service
- func (s *Service) CreateJob(ctx context.Context, jobCreate *model.JobCreate) (*model.Job, error)
- func (s *Service) DeleteJob(ctx context.Context, id uuid.UUID) error
- func (s *Service) FinishJobExecution(ctx context.Context, job *model.Job, startTime, stopTime time.Time, err error) error
- func (s *Service) GetJob(ctx context.Context, id uuid.UUID) (*model.Job, error)
- func (s *Service) GetJobExecutions(ctx context.Context, id uuid.UUID, failedOnly bool, limit uint64, ...) ([]*model.JobExecution, error)
- func (s *Service) GetJobsToRun(ctx context.Context, at time.Time, lockedUntil time.Time, instanceID string, ...) ([]*model.Job, error)
- func (s *Service) ListJobs(ctx context.Context, limit, offset uint64, tags []string) ([]model.Job, error)
- func (s *Service) UpdateJob(ctx context.Context, jobID uuid.UUID, jobUpdate model.JobUpdate) (*model.Job, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a struct that contains a store and a logger.
func NewService ¶
NewService creates a new job service with the given store and logger.
func (*Service) CreateJob ¶
CreateJob creates a new job using the given job create request and returns the created job. If the job create request is invalid, an error is returned.
func (*Service) FinishJobExecution ¶
func (*Service) GetJobExecutions ¶
func (*Service) GetJobsToRun ¶
func (s *Service) GetJobsToRun(ctx context.Context, at time.Time, lockedUntil time.Time, instanceID string, limit uint) ([]*model.Job, error)
GetJobsToRun returns a list of jobs that should be run at the given time.
Click to show internal directories.
Click to hide internal directories.