jobs

package
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJobService

func NewJobService(config JobServiceConfig) services.IJobService

Types

type JobService

type JobService struct {
	// contains filtered or unexported fields
}

func (*JobService) Create

func (s *JobService) Create(ctx context.Context, j *models.Job) error

func (*JobService) Delete

func (s *JobService) Delete(ctx context.Context, j *models.Job) error

func (*JobService) Find

func (s *JobService) Find(ctx context.Context, filter *stores.JobFilter) (*models.Job, error)

func (*JobService) List

func (s *JobService) List(ctx context.Context, filter *stores.JobFilter) ([]*models.Job, error)

func (*JobService) UpdateState

func (s *JobService) UpdateState(ctx context.Context, jobId string, updateJobStateDto services.UpdateJobStateDTO) error

type JobServiceConfig

type JobServiceConfig struct {
	JobStore            stores.JobStore
	TrackTelemetryEvent func(event telemetry.Event, clientId string) error

	UpdateWorkspaceLastJob func(ctx context.Context, workspaceId string, jobId string) error
	UpdateTargetLastJob    func(ctx context.Context, targetId string, jobId string) error
	UpdateBuildLastJob     func(ctx context.Context, buildId string, jobId string) error
}

Jump to

Keyboard shortcuts

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