application

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobService

type JobService interface {
	CreateJob(ctx context.Context, jobConfig *domain.JobConfig, userID string, userAuthToken string) (*domain.Job, error)
	GetJob(ctx context.Context, jobNumber int) (*domain.Job, error)
	ClaimJob(ctx context.Context) (*domain.Job, error)
	UpdateJobState(ctx context.Context, jobNumber int, newState domain.State, userID string) error
	UpdateJobCollectionID(ctx context.Context, jobNumber int, collectionID string) error
	GetJobs(ctx context.Context, field sort.SortParameterField, direction sort.SortParameterDirection, states []domain.State, limit, offset int) ([]*domain.Job, int, error)
	GetJobStatesSummary(ctx context.Context) ([]domain.StateSummary, error)
	GetJobTasks(ctx context.Context, states []domain.State, jobNumber int, limit, offset int) ([]*domain.Task, int, error)
	CreateTask(ctx context.Context, jobNumber int, task *domain.Task) (*domain.Task, error)
	UpdateTask(ctx context.Context, task *domain.Task) error
	UpdateTaskState(ctx context.Context, taskID string, newState domain.State) error
	ClaimTask(ctx context.Context) (*domain.Task, error)
	CountTasksByJobNumber(ctx context.Context, jobNumber int) (int, error)
	GetNextJobNumber(ctx context.Context) (*domain.Counter, error)
	CreateEvent(ctx context.Context, jobNumber int, event *domain.Event) (*domain.Event, error)
	GetJobEvents(ctx context.Context, jobNumber int, limit, offset int) ([]*domain.Event, int, error)
	CountEventsByJobNumber(ctx context.Context, jobNumber int) (int, error)
}

JobService defines the contract for job-related operations

func Setup

func Setup(datastore *store.Datastore, appClients *clients.ClientList, cfg *config.Config) JobService

Setup initializes a new JobService with the provided dependencies.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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